1 Reply Latest reply on Jun 19, 2008 8:00 AM by matthew horn

    Optimization of ItemRenderer on a LineSeries

      Hi there,

      I'm currently using a flex chart with 2 lineseries. I specified for each of them a custom itemrenderer.
      I attached some code at the end as a quick sample:

      All works fine until I reach the amount of 100 points on each series, where the rendering becomes a little choppy, especially since we are using an animation whenever the dataprovider of each series is updated.
      So in order to optimize the rendering, I was thinking of 2 different solutions.
      1. Have our designer give me a swf that would have a frame for each different color I need and then add this swf within the updatedisplaylist of my itemrenderer.
      2. Run the drawing code only once at the beginning of my app, save it in a shape and reuse that shape in the updatedisplaylist of my itemrenderer instead of redrawing each time the same thing.

      I'd like to get some of your input, which solution would be better to lighten the work load of the flash player, and also if I should make my renderer derive this way:
      public class MyRenderer extends mx.skins.ProgrammaticSkin implements IDataRenderer

      or another.

      Thanks a lot in advance for your input.