Charts AndroidPlot:如何在一个绘图上组合不同的图表类型?

Charts AndroidPlot:如何在一个绘图上组合不同的图表类型?,charts,androidplot,Charts,Androidplot,如何将折线图和条形图组合在一个绘图上?文档中没有提到此功能。这对AndroidPlot可能吗?在创建ur活动时使用此选项 setContentView(R.layout.main); XYPlot plot = (XYPlot) findViewById(R.id.mySimpleXYPlot); Number[] series1Numeros = { 1, 8, 5, 2, 7, 4 }; XYSeries series1 = new SimpleXYSeries(A

如何将折线图和条形图组合在一个绘图上?文档中没有提到此功能。这对AndroidPlot可能吗?

在创建ur活动时使用此选项

setContentView(R.layout.main);
    XYPlot plot = (XYPlot) findViewById(R.id.mySimpleXYPlot);

    Number[] series1Numeros = { 1, 8, 5, 2, 7, 4 };
    XYSeries series1 = new SimpleXYSeries(Arrays.asList(series1Numeros), 
            SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "Intereses");

    XYSeries series = new SimpleXYSeries(Arrays.asList(new Number[] { 1, 2, 3, 4, 5 }),
            SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "title");
    BarFormatter formatter = new BarFormatter(Color.rgb(0, 200, 0), Color.rgb(100, 0, 0));
    plot.addSeries(series, BarRenderer.class, formatter);
    BarRenderer renderer = (BarRenderer) plot.getRenderer(BarRenderer.class);
    LineAndPointFormatter series1Format = new LineAndPointFormatter(Color.rgb(0, 200, 0),
            Color.rgb(0, 100, 0),
            null); 

    plot.addSeries(series1, series1Format);