2 Replies Latest reply on Dec 24, 2008 5:02 AM by Newsgroup_User

    Adding ColumnSeries in ActionScript

    dstrube
      I'm lookng for a way to add ColumnSeries to a ColumnChart thru actionscript. The ColumnChart is in mxml, dataprovider is an ArrayCollection of two objects, each with three items: a name, and two sets of number data. The type of the chart is overlaid and there are two series. Thus there are 4 vertical bars in two columns. However, given the data differences, you can only see 3 of the bars: the 4th bar is behind the 3rd in the 2nd column. Confusing enough yet? It makes more sense when you see it. (testChart1.mxml) Anyways, I want to add the ColumnSeries dynamically, in a certain order, based on the dataprovider's data. (testChart2.mxml) What am I doing wrong and what is the right way to do this?
      Thanks
        • 1. Re: Adding ColumnSeries in ActionScript
          dstrube Level 1
          Oh yeah, forgot to mention: how does one set the fill and stroke of a columnSeries in actionscript?
          • 2. Re: Adding ColumnSeries in ActionScript
            Level 7

            "dstrube" <webforumsuser@macromedia.com> wrote in message
            news:girlcc$4sg$1@forums.macromedia.com...
            > I'm lookng for a way to add ColumnSeries to a ColumnChart thru
            > actionscript.
            > The ColumnChart is in mxml, dataprovider is an ArrayCollection of two
            > objects,
            > each with three items: a name, and two sets of number data. The type of
            > the
            > chart is overlaid and there are two series. Thus there are 4 vertical bars
            > in
            > two columns. However, given the data differences, you can only see 3 of
            > the
            > bars: the 4th bar is behind the 3rd in the 2nd column. Confusing enough
            > yet? It
            > makes more sense when you see it. (testChart1.mxml) Anyways, I want to add
            > the
            > ColumnSeries dynamically, in a certain order, based on the dataprovider's
            > data.
            > (testChart2.mxml) What am I doing wrong and what is the right way to do
            > this?

            This is a line chart example, but it might point you in the right direction:
            http://flexdiary.blogspot.com/2008/08/charting-example.html