0 Replies Latest reply on Jul 23, 2009 8:27 AM by W@rr3n

    Column Charting using remote service


      Hi Friends,


      as I am a noob to Flex, I'd like to get some help regarding some Charting I am trying to produce.  I have a remote service which calls a java/sql app which provides data. Once the data is returned (in the form of arrays), I need to display the data in a Column Chart. I am able to get the data and display the chart, however I have no control over the chart.


      How can I define the series so I can correctly label the data on the charts? Also need the series defined so I can customize the colour etc of the chart.  Below is a snippet of the Action Script code which I have whipped up to get the data and display it:



                  public function resultHandler(event:ResultEvent):void
                      arr = event.result as Array;
                      var colArr:Array=new Array();
                      var j:Array = new Array();
                      for (var i:int=0;i<arr.length;i++)
                          j[i]= new ColumnSeries();                                   
                           j[i].dataProvider = arr;
                           j[i].displayName = i as String;                         
                             j[i].yField = String(i);
                             if (i!=0) colArr.push(j[i]);
                          // Original line
                          columnChart.series = colArr;             


      Any help would be much appreciated!