Im implementing AnyChart LineChart in my Android app and struggling to display coloured grid.
What I'd like to achieve in terms of the background (not a chart type) is: https://playground.anychart.com/docs/v8/samples/AGST_Axes_Basic_11
I manage to display the data however as soon as I put the code responsible for coloring the grid the chart is not displayed. Here's the code:
String[] rangeColors = new String[] {"#ff0000", "#00ff00"};
cartesian.yGrid(0).palette(rangeColors);
cartesian.yGrid(0).palette().count(10);
cartesian.yScale().minimum(390).maximum(859);
cartesian.yScale().ticks().interval(10);
If I remove the line:
cartesian.yGrid(0).palette().count(10);
Then the chart displays with the yGrid coloured but it's green and red intertwined in a way one interval is green next red then again green and so on.
Rest of the code related to the chart comes from the example: https://github.com/AnyChart/AnyChart-Android/blob/master/sample/src/main/java/com/anychart/sample/charts/LineChartActivity.java The only difference is Im having only 1 data series instead of 3.
Could anyone help me get the example work in Android?