0 Replies Latest reply on Oct 25, 2007 4:08 AM by Giribabums

    Problem in showing DataTips for SecondSeries

    Giribabums
      Hi,

      I have created a chart with 2 series 1st is columnseries 2nd lineseries and i have written code for showing datatips but the problem is the datatip is showing for only 1series either columnseries or lineseries. I want to show both series DataTip on mouseover how can i achieve this. Just check the ProgChartTipFunction and tell me what need to be added to show both the datatips.

      [code]
      private function ProgChartTipFunction(hitData:HitData):String
      {
      return(ColumnSeries(hitData.element).displayName +" - "+ hitData.item.Category + "\n"
      + "Value : "+ hitData.item.OnTarget);
      //return(LineSeries(hitData.element).displayName +" - "+ hitData.item.Category + "\n"
      + "Value : "+ hitData.item.OnTarget);
      }
      [/code]

      [code]
      <mx:ColumnChart id="progChart" x="5" y="5" height="235" width="532" color="#313131" dataProvider="{ProgChartData}"
      secondDataProvider="{ProgChartData}" showDataTips="true" dataTipFunction="{ProgChartTipFunction}">
      <mx:horizontalAxis>
      <mx:CategoryAxis categoryField="Category"/>
      </mx:horizontalAxis>
      <mx:series>
      <mx:ColumnSeries displayName="On Target" xField="Category" yField="OnTarget"/>
      <mx:ColumnSeries displayName="Almost Behind" xField="Category"
      yField="AlmostBehind"/>
      <mx:ColumnSeries displayName="Behind" xField="Category" yField="Behind"/>
      </mx:series>
      <mx:secondSeries>
      <mx:LineSeries displayName="Predicted" xField="Category" yField="Predicted"
      itemRenderer="mx.charts.renderers.CircleItemRenderer"/>
      </mx:secondSeries>
      </mx:ColumnChart>
      [/code]

      Thanks in advance