_chartItem.item[BarSeries(_chartItem.element).xField]; (chartItem.item is the original record out of the dataProvider. BarSeries(_chartItem.element).xField is the field you told the series to use as its x value). Ely. From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of barry.beattie Sent: Wednesday, September 05, 2007 4:25 AM To: [email protected] Subject: [flexcoders] Chart itemRenderers - how to get origional data values? this *should* be easy. following one of Ely's bar chart itemRenderers, a label is created on each bar showing it's value. Unfortunately, this itemRenderer uses the X position where the drawn bar ends. _label.text = BarSeriesItem(_chartItem).xValue.toString(); The trouble is I've got a BarSet and I need to use the value behind each BarSeries to use as the label text, not where the bar has finished being drawn. eg: data used on each item of the BarSeries:3, 5, 10 label values that need to be displayed: 3, 5, 10 values actually displayed using xValue: 3, 8, 18 how can I get to the underlying data that's used to drive the xValue from within the itemRenderer? many thanks barry.b public function set data(value:Object):void { if (_chartItem == value) { return; // value already set, exit } _chartItem = ChartItem(value); // else set the value if(_chartItem != null) _label.text = BarSeriesItem(_chartItem).xValue.toString(); }
<<image001.jpg>>
<<image002.jpg>>

