I have the following problem:
My datagrid has a custom item renderer, showing a sparkline. Each row of the DG is displaying a sparkline based on the values found in the datprovider (arrayCollection). Now I have an index (to display a unique number for each value in the sparkline) counting up within the ItemRenderer.
It seems to work, that every row in the DG has a unique Renderer with a unique index number. However, when I reload the data, the index seems not to be unique anymore, it keeps on counting even though it should be reset to 0.
Any ideas?
[Bindable]
public var microLineChart_renderer : ClassFactory;
public function init(){
microLineChart_renderer = new ClassFactory( views.microcharts.renderer.MicroLineRenderer2 );
}
public function loadData( event : ResultEvent){
microLineChart_renderer.properties = { currentIndex: 0};
dg_accounts.dataProvider = result[ 0 ] as Array;
}