1 Reply Latest reply on Aug 30, 2006 5:12 PM by Delodic

    Updating the color of an itemrenderer

      Yup, another question. In my chart I want to disply icons at the datatips to make clear that's a datapoint. Since the user can choose the color of a serie, also this itemrenderers color should be updated. Although my linerenderer is updating the new colors nicely, the itemrenderer doesn't.

      This is what I use to format my lineseries.


      <mx:LineSeries id="rnw_lijn" displayName="Renew" radius="5" yField="Yrnw" xField="Xrnw" >
      <mx:SolidColor color="{picker_rnw.selectedColor}"/>

      <mx:Stroke color="{picker_rnw.selectedColor}" alpha=".8" />
      <mx:Stroke color="{picker_rnw.selectedColor}" weight="2"/>
        • 1. Re: Updating the color of an itemrenderer
          Delodic Level 1
          Ok, I think I've to use an eventlistener and a eventdispatcher? But I'm new to this and untill now i couldn't really figure out how to do this.

          By the way, I find it strange that the chart does update the color of the line, but does not update the color of the stroke and fill. I tried using chart.invalidateSeriesStyles(); hoping that it would totally redraw the chart an also the stroke and everything, but unfortunately this doesn't work :(