android - background color only between line graph (GraphView) -
library: graphview version: 4.2.1
is possible set background color between 2 curves? this:
setdrawbackground
changes color between curve , coordinate line, isn't need:
code 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);
Comments
Post a Comment