0 Replies Latest reply on Nov 5, 2012 6:52 AM by tiger886

    Dynamic Column Chart

    tiger886 Level 1



      we are trying to develope a dynamic column chart .but i faild to achived this can any one know how to create a dynamic column chart .some sample code

      i am providing.

      var arrCol:ArrayCollection=new ArrayCollection();

                                                                             var ob:Object;

      for(var l:int=0;l<4;l++)


                                                                                       ob=new Object();




                                                                                       ob['category']="diesel Expense";

                                                                                       }else if(l==1)



                                                                                       ob['category']="stationary Expense";



                                                                                       else if(l==2)



                                                                                       ob['category']="Light Bill Expense";




                                                                                       else if(l==3)



                                                                                       ob['category']="security Expense";






      //***********  stackedColumnChart is my columnchart object




      var columnSet:ColumnSet = new ColumnSet();

              columnSet.type = "clustered";                                                   

               var columnSeries:ColumnSeries;

           var seriesArray:Array = new Array();


      for(var i:int = 0; i < arrCol1.length; i++){ 

               columnSeries = new ColumnSeries();   

               columnSeries.yField = arrCol1[i].category ;

              columnSeries.displayName = arrCol1[i].category;


           //   Alert.show("ff"+ arrCol[i].category);

      }           columnSet.series = seriesArray;

      stackedColumnChart.series = [columnSet];



      this code is showing legend properly but does not create any column chart.

      please help it urgent......