This content has been marked as final. Show 1 reply
"dalejoel" <firstname.lastname@example.org> wrote in message
> Hello -
> In the spirit of the Model/View/Controller pattern I have created a view
> Flex (mxml). I have a data model that is an object called a Chart which
> contains an array of ChartSeries. Each ChartSeries contains an array of
> DataPoint objects that have an x and y coordinate member. These are all
> generated from wsdl on a .NET webservice that provides the data.
> My Flex View already has a PlotChart, a vertical and horizontal axis, and
> buttons. What I want to do is examine the Chart object to see how many
> ChartSeries it contains. For each ChartSeries I wish to create a
> PlotSeries in
> actionscript and add it to the PlotChart. I then wish to connect the
> array in the ChartSeries with the newly created PlotSeries.
> The intended result is to have my Flex application be able to display a
> variable number of PlotSeries all determined by how many the Chart object
> contains. All of this needs to be runtime decided.
> I am simply using actionscript to create a PlotSeries per ChartSeries,
> as the dataProvider the DataPoint array within the associated ChartSeries,
> then call PlotChart.addChild( <new PlotSeries> );
> However, nothing is graphing properly. I am at best getting one point to
> up OFF off the graph and seeing nothing else. Stepping through the code I
> that my PlotSeries.item property is not getting set until after I have
> the PlotSeries to the PlotChart.
There's an example on my blog that you may or may not find useful: