我正在使用立方折線圖achartengine,但它似乎並沒有工作。立方形折線圖不通過系列中的所有點。在這個例子中,圖形遠離點。我做錯了什麼,或者這是achartengine的實際問題?樣條曲線使用achartengine立方折線圖不通過所有點
代碼:
XYMultipleSeriesDataset series = new XYMultipleSeriesDataset();
XYValueSeries newTicketSeries = new XYValueSeries("New Tickets");
newTicketSeries.add(1, 14);
newTicketSeries.add(2, 12);
newTicketSeries.add(3, 18);
newTicketSeries.add(4, 5);
newTicketSeries.add(5, 10);
series.addSeries(newTicketSeries);
XYValueSeries fixedTicketSeries = new XYValueSeries("Fixed Tickets");
fixedTicketSeries.add(1, 15);
fixedTicketSeries.add(2, 5);
fixedTicketSeries.add(3, 15);
fixedTicketSeries.add(4, 5);
fixedTicketSeries.add(5, 15);
series.addSeries(fixedTicketSeries);
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.setAxisTitleTextSize(56);
renderer.setChartTitleTextSize(50);
renderer.setLabelsTextSize(55);
renderer.setZoomEnabled(true, false);
renderer.setPanEnabled(false, false);
renderer.setRange(new double[]{0, 10, 0, 20});
//renderer.setMargins(new int[] { 20, 30, 15, 0 });
XYSeriesRenderer newTicketRenderer = new XYSeriesRenderer();
newTicketRenderer.setColor(Color.argb(250, 0, 210, 250));
renderer.addSeriesRenderer(newTicketRenderer);
XYSeriesRenderer fixedTicketRenderer = new XYSeriesRenderer();
fixedTicketRenderer.setColor(Color.RED);
fixedTicketRenderer.setLineWidth(10);
fixedTicketRenderer.setPointStyle(PointStyle.CIRCLE);
fixedTicketRenderer.setFillPoints(true);
renderer.addSeriesRenderer(fixedTicketRenderer);
renderer.setPointSize(40);
renderer.setXLabels(0);
renderer.setYLabels(0);
newTicketRenderer.setDisplayChartValues(true);
newTicketRenderer.setChartValuesTextSize(30);
renderer.setShowGrid(false);
renderer.setShowLegend(true);
renderer.setShowLabels(false);
renderer.setBarSpacing(0.5);
renderer.setBackgroundColor(Color.TRANSPARENT);
renderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
//renderer.setZoomEnabled(false, false);
GraphicalView chartView;
String[] types = new String[] { BarChart.TYPE, CubicLineChart.TYPE};
chartView = ChartFactory.getCombinedXYChartView(getActivity(), series, renderer, types);
您使用的是什麼版本的ACE? –
最新。 1.1.0。此外,該演示受到相同的錯誤。如果你去AChartEngine演示,然後選擇組合溫度。橙色線上可以看到同樣的效果。 – Zeezer