开发者

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";
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜