views:

68

answers:

0

I am simply trying to hide a datatip on a chart if the hit data item (yfield item) is == 101 for two differnt series an areaseries and a line series. The following funciton works in IE but throws an error in firefox. I am new to flex and was wondering if there is a better way to approch this..

the code in // is causing the error.

public function datatip_M_chart(e:HitData):String { 
//if (e.item.STUB == 101) {e.chartItem.itemRenderer.alpha = 0}//
if (e.chartItem is AreaSeriesItem){
         return'<b>'+COMBO.selectedLabel+'</b>'+
         '<br/><i>Age: </i>' + e.item.STUB + 
         '<br/><i>Percentage:</i> ' + e.item.M_PROP+'%';
}else{

         return'<b>'+COMBO2.selectedLabel+'</b>'+
         '<br/><i>Age: </i>' + e.item.STUB + 
         '<br/><i>Percentage:</i> ' + e.item.M_PROP+'%';
}