0 Replies Latest reply on Jun 23, 2006 6:31 AM by FrankAtcomm

    convert xml webservice result to series for chart

    FrankAtcomm Level 1

      I want these data to be shown in a chart...


      I already have a function to convert the xml result into a dataprovider, maybe I just have to add a few lines here ?

      private function FillMonthTotal():void {
      var x:XML = new XML(WsMonthTotal.WsMonthTotal.lastResult);


      salesChart.dataProvider = new XMLListCollection(x.children());

      I was trying with this mxml, but only get the horizontalAxis to work. How do I get the values of YearFields (for 2003, 2004, ...) to be shown as different areas on the chart dynamically, so it doesn't has to be changed in the code every year ?

      <mx:AreaChart id="salesChart" width="300" height="300">
      <mx:CategoryAxis categoryField="ShowMonth"/>
      <mx:ColumnSeries xField="ShowMonth" yField="2003" displayName="2003"/>
      <mx:ColumnSeries xField="ShowMonth" yField="2004" displayName="2004"/>
      <mx:ColumnSeries xField="ShowMonth" yField="2005" displayName="2005"/>
      <mx:ColumnSeries xField="ShowMonth" yField="2006" displayName="2006"/>
      </mx:series> -->

      Thanks a lot for any help or suggestions ...