Reputation: 1385
Context: Java swing application generating a chart using JFreeChart. The chart is a CombinedDomainXYPlot
(using XYBarRenderer
) that on the X-axis has a timeline based on PeriodAxis
.
Problem: I can't remove the vertical gridlines (not the tickmarks related to the time periods) that separate days.
What I tried is: combinedPlot.setDomainGridlinesVisible(false)
which doesn't work (see image below).
Any hint would be more than welcome!
Thx, Thomas
Upvotes: 1
Views: 1361
Reputation: 1385
After some additional research I found the mistake: for CombinedDomainXYPlot
the setDomainGridlinesVisible(false)
needs to be called on the subplots:
List<XYPlot> subplots = (List<XYPlot>) combinedPlots.getSubplots();
for (XYPlot p:subplots) p.setDomainGridlinesVisible(false);
Upvotes: 3