You may new a linechart firstly. var lineChart:LineChart = new LineChart(); set the properties here; this.addChild(lineChart);
--- In flexcoders@yahoogroups.com, arpan srivastava <[EMAIL PROTECTED]> wrote: > > Hi , > I need to draw a linechart using only actionscript. I have done following: > > private var cat:CategoryAxis; > private var lineS:LineSeries; > > this.dataProvider = _myDataProvider; > cat = new CategoryAxis(); > cat.categoryField = "interval"; > cat.dataProvider = chartDataProvider; > this.horizontalAxis = cat; > > lineS = new LineSeries(); > lineS.yField = "data"; > lineS.dataProvider = _myDataProvider; > this.series = new Array(lineS); > > this.height=400; > this.width=400; > this.showDataTips=true; > > Now where should I write this code. I have written it in initllize () function, but it is not working. My class is extending LineChart >