I wish to turn off the x-y grid behind my chart lines on a basic time series chart. Is there a way to do this?
Thanks,
Kenny
Turning off grid on a time series chart
Re: Turning off grid on a time series chart
Yes. In 0.9.4, the grid lines are controlled and drawn by the axes. You can hide them completely using the setGridLinesVisible(...) method:
XYPlot plot = myChart.getXYPlot();
ValueAxis domainAxis = plot.getDomainAxis();
domainAxis.setGridLinesVisible(false);
ValueAxis rangeAxis = plot.getRangeAxis();
rangeAxis.setGridLinesVisible(true);
From past feedback, I've decided that the grid line settings should be moved to the plot class (that seems a more logical place to find them), so the API for this will change in 0.9.5.
Regards,
DG
XYPlot plot = myChart.getXYPlot();
ValueAxis domainAxis = plot.getDomainAxis();
domainAxis.setGridLinesVisible(false);
ValueAxis rangeAxis = plot.getRangeAxis();
rangeAxis.setGridLinesVisible(true);
From past feedback, I've decided that the grid line settings should be moved to the plot class (that seems a more logical place to find them), so the API for this will change in 0.9.5.
Regards,
DG