At runtime, I'm changing the itemRenderer on my column chart's series
based on the value of a checkbox. Pretty simple. Unfortunately, it
appears to me that both itemRenderers - the previous and the current -
are getting called.
Prior to changing the itemRenderer, I clear the series style, but that
doesn't seem to help. The more often I change the itemRenderers, the
more they stack up, with each replaced one getting called prior to the
actual assigned one.
So - either this is a bug (haven't found it yet in the bugbase, but
there are quite a few to sort through), or there's additional code
that I need to ensure that changing an itemRenderer at runtime
actually does a replace, rather than an add.
The code to swap them is pretty simple (column0 refers to a
ColumnSeries), but here it is anyway:
column0.clearStyle("itemRenderer");
if (chkbox.selected)
column0.setStyle("itemRenderer", new ClassFactory(Renderer1));
else
column0.setStyle("itemRenderer", new ClassFactory(Renderer2));
Can anyone clue me in here?
I've written a very basic sample to demonstrate this problem if it's
needed, but the above code pretty much says it all.
Thanks,
Eddie