private function dataTipFunc(item:HitData):String {
var cSI:LineSeriesItem = item.chartItem as LineSeriesItem;
return "<font size='12'><b>月份</b><br /><b>"+cSI.[color=red]xFilter[/color]+ ":</b>" +cSI.[color=red]yFilter[/color] + "</font>";
}
<mx:LineChart id="lineChart"
height="100%"
width="100%"
showDataTips="true"
dataTipFunction="dataTipFunc"
dataProvider="{dp}"
creationComplete="init(event);">
<mx:series>
<mx:LineSeries id="lineSeries"
xField="x"
yField="y"
>
<mx:showDataEffect>
<mx:SeriesInterpolate duration="1000" />
</mx:showDataEffect>
</mx:LineSeries>
<mx:LineSeries id="lineSeries2"
xField="x"
yField="r"
>
<mx:showDataEffect>
<mx:SeriesInterpolate duration="100" />
</mx:showDataEffect>
</mx:LineSeries>
</mx:series>
</mx:LineChart>
var cSI:LineSeriesItem = item.chartItem as LineSeriesItem;
return "<font size='12'><b>月份</b><br /><b>"+cSI.[color=red]xFilter[/color]+ ":</b>" +cSI.[color=red]yFilter[/color] + "</font>";
}
<mx:LineChart id="lineChart"
height="100%"
width="100%"
showDataTips="true"
dataTipFunction="dataTipFunc"
dataProvider="{dp}"
creationComplete="init(event);">
<mx:series>
<mx:LineSeries id="lineSeries"
xField="x"
yField="y"
>
<mx:showDataEffect>
<mx:SeriesInterpolate duration="1000" />
</mx:showDataEffect>
</mx:LineSeries>
<mx:LineSeries id="lineSeries2"
xField="x"
yField="r"
>
<mx:showDataEffect>
<mx:SeriesInterpolate duration="100" />
</mx:showDataEffect>
</mx:LineSeries>
</mx:series>
</mx:LineChart>