views:

451

answers:

0

Hi guys, I've developed a Linechart in ActionScript.When it work with live data,horizontal axis become too much clustered.So i'd like to increase the scale of Xaxis with more values.Can anybody suggest me ,how i can implement it

var lineChart:LineChart=new LineChart;
tradesAC=new ArrayCollection;
lineChart.dataProvider=tradesAC;
lineChart.percentWidth = 100;
lineChart.percentHeight =100;
lineChart.x = 100;
lineChart.y = 400;
lineChart.showDataTips=true;
var categoryAxis:CategoryAxis=new CategoryAxis;
categoryAxis.categoryField="Time";    
lineChart.horizontalAxis=categoryAxis;

var localSeries:LineSeries = new LineSeries();               
localSeries.yField = "Price";
localSeries.xField = "Time";
localSeries.dataProvider=tradesAC;
localSeries.setStyle("lineStroke", new Stroke(0xFF0000,2, 0.4));
var arr2:Array = new Array();
arr2.push(localSeries);
lineChart.series = arr2;

var lblScrip:Label=new Label;
lblScrip.text=stName;
var legendLine:Legend = new Legend();
legendLine.dataProvider = lineChart;
legendLine.x = 700;
legendLine.y = 140;