When I do following it sometimes shows null in the datalabel on a
barchart eg. "0.null" (the value is actually 0.06)
  
private function setCustomLabel(element:ChartItem, series:Series):String {
           // Get a refereence to the current data element.
           var data:BarSeriesItem = BarSeriesItem(element);        
            
           // Get a reference to the current series.        
           var currentSeries:BarSeries =  BarSeries(series);
    
           // Create a return String and format the number.
            return data.xNumber.toString()+" %";
                    
       }
  
And in the chart I have  
  
<mx:BarSeries  color="black" labelFunction="setCustomLabel"
labelPosition="inside"  yField="Name"   xField="Rank" />  
  
Why does it show null value? (this happens only sometimes), and any
solution to this?

Thanks

Reply via email to