Hi,
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();*
* if(l==0)*
* {*
* ob["month"]="January"*
* ob['category']="diesel Expense";*
* }else if(l==1)*
* {*
* ob["month"]="Feb"*
* ob['category']="stationary Expense";*
* ob["category_head"]="Generator";*
* }*
* else if(l==2)*
* {*
* ob["month"]="March"*
* ob['category']="Light Bill Expense";*
* ob["category_head"]="Generator";*
* *
* }*
* else if(l==3)*
* {*
* ob["month"]="april"*
* ob['category']="security Expense";*
* ob["category_head"]="Generator";*
* *
* }*
*arrCol.addItem(ob);*
*}*
//*********** stackedColumnChart is my columnchart object
*stackedColumnChart.dataProvider=arrCol;*
* xAxis.categoryField="month"*
*
*
* 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;*
* seriesArray.push(columnSeries);*
* // Alert.show("ff"+ arrCol[i].category);*
* } columnSet.series = seriesArray;*
*stackedColumnChart.series = [columnSet]; *
*var legend:Legend = new Legend();*
* legend.y=50;*
* legend.x=20;*
* legend.direction = "horizontal"; *
* legend.dataProvider = stackedColumnChart; *
* this.addChild(legend);*
*this.addChild(stackedColumnChart);*
*****************
this code is showing legend properly but does not create any column chart.
please help it urgent......
thanks
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/flex_india/-/GDELL53h1esJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.