Posts

Showing posts with the label hitdata

datatipfunction in a linechart

To customize the datatip in a linechart in flex you need to use the datatipfunction property that refers to a function. This function must return a string and take a parameter of type HitData. To get the current VALUE of the line point you're mousing over you need to use LineSeriesItem(hitData.chartItem).yValue - I found this difficult to find out at first. Here's an example: private function lcDataTipFunction(hitData:HitData):String { var s:String; s = LineSeries(hitData.element).displayName + "\n"; s += LineSeriesItem(hitData.chartItem).yValue + "\n"; s += hitData.item.Day + " at " + hitData.item.Time; return s; }