Hi all !

I'm trying to implement the code found here

http://livedocs.adobe.com/flex/3/html/charts_intro_7.html#225506

It's the last part with the multiple line series.

My problem is that I'm updating the series based on a request instead of populating it in the creationComplete()
The method described here is called on a resultEvent

        public function initApp():void {
            var wholist:Array = new Array();
            for each(var property:XML in myXML.item.who) {
                // Create an Array of unique names.
                if (wholist[property] != property)
                    wholist[property] = property;
            }

            // Iterate over names and create a new series
            // for each one.
            for (var s:String in wholist) {
                // Use all items whose name matches s.
                var localXML:XMLList = myXML.item.(who==s);

                // Create the new series and set its properties.
                var localSeries:LineSeries = new LineSeries();
                localSeries.dataProvider = localXML;
                localSeries.yField = "hours";
                localSeries.xField = "when";

                // Set values that show up in dataTips and Legend.
                localSeries.displayName = s;

                // Back up the current series on the chart.
                var currentSeries:Array = myChart.series;
                // Add the new series to the current Array of series.
                currentSeries.push(localSeries);
                // Add the new Array of series to the chart.
                myChart.series = currentSeries;
            }

How can I redraw my line series, knowing that it's in a VBox in a ViewStack ?
I've been calling validateNow() on a bunch of components...


Thanks again

Reply via email to