2 Replies Latest reply on Jul 26, 2007 4:16 AM by abudahim

    is there a way to format a chart item ?

    abudahim Level 1
      for example, in a bar chart, i have 4 series (bars). is there a way to change the color of one of them not all of them ?
      thanks
        • 1. Re: is there a way to format a chart item ?
          chris.huston.t10 Level 3
          You can set the series color with the following style mxml:
          <mx:Style>
          ColumnChart {
          chartSeriesStyles: Series1, Series2, Series3, Series4;
          }
          .Series1 {
          fill: #993300;
          }
          .Series2 {
          fill: #339900;
          }
          .Series3 {
          fill: #003399;
          }
          .Series4 {
          fill: #6666AA;
          }
          </mx:Style>

          Or you could set a particular series color in AS:
          firstSeries.setStyle('fill',0x993300);

          This code assumes that your series id = firstSeries.

          Vygo
          • 2. Re: is there a way to format a chart item ?
            abudahim Level 1
            hi Masamune
            using mxml, i connot change colors in runtime . however i can using AS.
            the code you wrote: firstSeries.setStyle('fill',0x993300); is applied to a set of series which are firstSeries.
            how i can refer to single series in firstSeries so that i can change its color ?
            thank you