请看图片,第一个是adb模拟器,第二个是三星Galaxy Tab。
Image1 Image 1 http://i41.tinypic.com/qph4kl.png
Image2 Image 2 http://i41.tinypic.com/2czzwpg.jpg
我不知道为什么在标签中aChartEngine会显示两个图表。
这是代码:
`private void MostrarCurvas(Estructuras.DatosCurva curva_uno, Estructuras.DatosCurva curva_dos) { XYSeries uno = new XYSeries("Adquisicion");
XYSeries dos = new XYSeries("Interpolacion");
for (int i = 0; i < curva_uno.b.Length; i++)
{
uno.Add(curva_uno.a[i], curva_uno.b[i]);
}
for (int i = 0; i < curva_dos.b.Length; i++)
{
dos.Add(curva_dos.a[i], curva_dos.b[i]);
}
XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
dataset.AddSeries(uno);
dataset.AddSeries(dos);
XYSeriesRenderer unoRender = new XYSeriesRenderer();
unoRender.Color = Color.Blue;
unoRender.PointStyle = PointStyle.Point;
unoRender.LineWidth = 1;
XYSeriesRenderer dosRender = new XYSeriesRenderer();
dosRender.Color = Color.Green;
dosRender.PointStyle = PointStyle.Point;
dosRender.LineWidth = 1;
XYMultipleSeriesRenderer multiRenderer = new XYMultipleSeriesRenderer();
multiRenderer.XTitle = "(V)";
multiRenderer.YTitle = "(I)";
multiRenderer.AddSeriesRenderer(unoRender);
multiRenderer.AddSeriesRenderer(dosRender);
LinearLayout layout = FindViewById<LinearLayout>(Resource.Id.graph);
GraphicalView ChartView = ChartFactory.GetLineChartView(this, dataset, multiRenderer);
layout.AddView(ChartView); }`
答案 0 :(得分:1)
您可以使用multiRenderer.setInScroll(true);