I have a variable which hold the name of the object I am trying to target in my array collection.
example
ActionScript Code:
var ac:ArrayCollection = new ArrayCollection([{country:"USA", amount:19000}, {country:"JPN", amount:7800 }])
var label:String = "country";
I need to access this value for my custom dataTipFunction. I have tried this with no success
ActionScript Code:
private function pieDataTipFunc(h:HitData) :String
{
var psi:PieSeriesItem = h.chartItem as PieSeriesItem;
var s:String;
s = psi.item(label)+"\nTotal Offload : "+decimalToPercentage(Number(psi.value));
return s;
}
Also when I try this it fails
ActionScript Code:
private function pieDataTipFunc(h:HitData) :String
{
var psi:PieSeriesItem = h.chartItem as PieSeriesItem;
var s:String;
s = psi.item.label+"\nTotal Offload : "+decimalToPercentage(Number(psi.value));
return s;
}