在Activity中利用AChartEngine (ACE)显示图表.
在Activity中利用AChartEngine (ACE)显示图表.
基本思路: 设定数据,渲染器,并且显示到GraphicsView中 .
?
具体操作:
1.布局文件(itemchartactivity.xml)中增加:
?
2 .AndoridManifest.xml中增加:
?
3.itemChartActivity中增加:??????? /*******3.在GraphicalView中显示.*/??????? layout = (LinearLayout) findViewById(R.id.chart);?????? //绑定控件??????? mChartView = ChartFactory.getTimeChartView(this, mDataset, mRenderer, "MM/dd/yyyy");??????? layout.addView(mChartView, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));