开发者

Flex charting dataTipFunction

开发者 https://www.devze.com 2022-12-17 09:48 出处:网络
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.

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

精彩评论

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

关注公众号