Hi
I have a ColumnChart where the bars are coloured using a custom AS
file taken from quietly scheming
public class colFill1 extends ProgrammaticSkin implements
IDataRenderer
I have used this in the past and found it great but in my current
dashboard I need to change the colours so created a second file class
colFill2 as the colours needed are different.
I can use either of these and get the chart to colour correctly but
am not able to switch them when changes are made to the chart. I have
public var RendererA:ClassFactory = new ClassFactory(comps.colFill1);
public var RendererB:ClassFactory = new ClassFactory(comps.colFill2);
then the function i use to change the renderer is this
public function changeRenderer(comp:String):void{
if(comp == 'x') {
series1.setStyle ("itemRenderer", RendererA);
}
else {
series1.setStyle ("itemRenderer", RendererB);
trace('colFill2 should be the renderer');
}
}
the first time it sets the style it works. but on any subsequent
occasions when changeRenderer is called there is no change on the
chart.
Any help will be gratefully appreciated.
Leon