import com.chart.*;
//
var chartData:Array=[];
var maxValue:Number=int(Math.random()*100+1)-50;
for(var i:int=0;i<20;i++){
chartData[i]=int(Math.random()*maxValue);
}
trace(chartData);
var chart:LineChart=new LineChart();
chart.hData=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];
chart.vData=[10,20,30,40,50,60];
chart.chartData=chartData;
chart.showChart();//以上三项不为null时,绘制图表
chart.axisType=LineChart.HBVR;
chart.vValueType=LineChart.AUTO_TYPE;
chart.cellWidth=15;
chart.cellHeight=12;
chart.mainVAxisColor=0xFC037C;//0xFC037C
chart.mainHAxisColor=0xFC037C;
chart.hAxisColor=0xFC037C;
chart.vAxisColor=0xFC037C;
chart.anchorFillColor=0x006600;
chart.lineColor=0xffff00;
chart.axisType=LineChart.HRVB;
chart.highlightColor=0xffffff;
chart.x=50;
chart.y=50;
addChild(chart);
|