This question is locked. New answers and comments are not allowed.
Hi,
I'm seeing some issues where the Chart's XY gridlines do not always show up.
When I have a DateTimeCategoricalAxis as the horizontal axis (set on the chart via setHorizontalAxis) and a vertical axis set on chart as well, only the horizontal gridlines seem to show up.
Here is a screenshot: https://www.dropbox.com/s/ko73sqhv81n72e1/2.png
I am setting the gridlines on the chart as follows:
CartesianChartGrid grid = new CartesianChartGrid(_context);
grid.setMajorXLinesRenderMode(GridLineRenderMode.INNER);
grid.setMajorYLinesRenderMode(GridLineRenderMode.INNER);
grid.setMajorXLineDashArray(new float[] {1, 8});
grid.setMajorYLineDashArray(new float[] {1, 8});
grid.setLineColor(Color.WHITE);
grid.setMajorLinesVisibility(GridLineVisibility.XY);
_chart.setGrid(grid);
Now the second problem I am seeing is that I tried removing the code to set vertical axis on the chart directly, and instead I set the vertical axis on a AreaSeries first and then add that AreaSeries to the chart. I am following the 'Indicators' sample code which does the same thing and does not set vertical axis directly on the chart. The chart renders fine but now neither horizontal nor vertical gridlines show up anymore. I tried moving the above code (for setting the grid) to different places but no luck.
Any idea what is wrong? For repro you can try to enable XY gridlines on the 'Indicators' sample code
I'm seeing some issues where the Chart's XY gridlines do not always show up.
When I have a DateTimeCategoricalAxis as the horizontal axis (set on the chart via setHorizontalAxis) and a vertical axis set on chart as well, only the horizontal gridlines seem to show up.
Here is a screenshot: https://www.dropbox.com/s/ko73sqhv81n72e1/2.png
I am setting the gridlines on the chart as follows:
CartesianChartGrid grid = new CartesianChartGrid(_context);
grid.setMajorXLinesRenderMode(GridLineRenderMode.INNER);
grid.setMajorYLinesRenderMode(GridLineRenderMode.INNER);
grid.setMajorXLineDashArray(new float[] {1, 8});
grid.setMajorYLineDashArray(new float[] {1, 8});
grid.setLineColor(Color.WHITE);
grid.setMajorLinesVisibility(GridLineVisibility.XY);
_chart.setGrid(grid);
Now the second problem I am seeing is that I tried removing the code to set vertical axis on the chart directly, and instead I set the vertical axis on a AreaSeries first and then add that AreaSeries to the chart. I am following the 'Indicators' sample code which does the same thing and does not set vertical axis directly on the chart. The chart renders fine but now neither horizontal nor vertical gridlines show up anymore. I tried moving the above code (for setting the grid) to different places but no luck.
Any idea what is wrong? For repro you can try to enable XY gridlines on the 'Indicators' sample code