awww ... woe ...

1180: Call to a possibly undefined method BarSeries.    
1120: Access of undefined property BarSeries.   
1046: Type was not found or was not a compile-time constant: BarSeries. 


import mx.charts.series.items.BarSeriesItem;
import mx.charts.series.items.*; //eh,whynot
...

        public function set data(value:Object):void
        {
                if (_chartItem == value)
                {
                        trace("value already set:" );
                        return; // and ... exit
                }       
                _chartItem = ChartItem(value); // else set the value
                var bs:BarSeries = _chartItem.element as BarSeries;
                if (bs)
                {
                        _label.text = 
_chartItem.item[BarSeries(_chartItem.element).xField];
                        
                }       
        }


Reply via email to