Flex charting dataTipFunction
My PieChart has a dataTipFunction property
My PieSeries has a labelFunction property
I would like my dataTipFunction to return the same string that my labelFunction returns.
Example, I would like my dataTipFunction to return:
return [whateverMyLabelFunctionReturned] + someExtraStuffThatI开发者_高级运维Add
thanks.
Here is what you do:
This is your label function.
private function myLabelFunction(value:*, a:*, b:*):String {
return value + 3; //Whatever you return here...
}
This is your datatip function.
private function pieChart_dataTipFunction(item:HitData):String {
var pSI:PieSeriesItem = item.chartItem as PieSeriesItem;
var labelResult:String = myLabelFunction(pSI.item.datalabel, null, null);
return labelResult + " some other text";
}
精彩评论