Hi there,
I believe you can do what you want simply by retrieving the "data"
property within your Renderer class.
If your renderer extends UIComponent you just have to do a this.data
within your updatedisplaylist function, and data should contain an
element of the dataprovider linked to your lineseries. You just have
to cast it to the wanted type.
But if your renderer extends ProgrammaticSkin for example you would
need to also do "implements IDataRenderer" and implementing set data
and get data.
>From the flex charting component "CircleItemRenderer"
....
/**
* @private
* Storage for the data property.
*/
private var _chartItem:ChartItem;
/**
* The chartItem that this itemRenderer displays.
* The CircleItemRenderer does not depend on any properties
* of the chart item.
*/
public function get data():Object
{
return _chartItem;
}
/**
* @private
*/
public function set data(value:Object):void
{
if (_chartItem == value)
return;
_chartItem = value as ChartItem;
}
....
You can then use the _chartItem casted to the wanted type within
updateDisplayList.
As a side note: you might also want to check if your item != null
before using it in updateDisplayList.
I hope that solves your problem !
Joss.
--- In [email protected], "y.mauron" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have a LineChart, with a lineSeries and a renderer for this series:
>
> <mx:series>
> <mx:Array>
> <mx:LineSeries xField="x" yField="y">
> <mx:itemRenderer>
> <mx:Component>
>
> <Identification:ChromatoItemRenderer>
>
>
> </Identification:ChromatoItemRenderer>
> </mx:Component>
> </mx:itemRenderer>
> </mx:LineSeries>
> </mx:Array>
> </mx:series>
>
> In my renderer I can retrieve the information such as x and y but I
> would like to pass an additional information from the dataProvider of
> my chart. Is it possible ?
>