图书馆:graphview 版本:4.2.1
是否可以在两条曲线之间设置背景颜色?像这样:
setDrawBackground
改变曲线和坐标线之间的颜色,这不是我需要的:
exaple代码:
LineGraphSeries<DataPoint> seriesUp = new LineGraphSeries<>(new DataPoint[]{
new DataPoint(0, 3),
new DataPoint(1, 7),
new DataPoint(2, 5),
new DataPoint(3, 4),
new DataPoint(4, 8)
});
graph.addSeries(seriesUp);
seriesUp.setDrawBackground(false);
seriesUp.setColor(Color.MAGENTA);
seriesUp.setDrawBackground(true);
LineGraphSeries<DataPoint> series = new LineGraphSeries<>(new DataPoint[]{
new DataPoint(0, 2),
new DataPoint(1, 6),
new DataPoint(2, 4),
new DataPoint(3, 3),
new DataPoint(4, 7)
});
graph.addSeries(series);
graph.getViewport().setScalableY(true);
series.setThickness(5);
series.setColor(Color.RED);
series.setAnimated(true);
series.setDrawDataPoints(true);
series.setDataPointsRadius(10);
series.setBackgroundColor(Color.CYAN);
series.setDrawBackground(false);