Take the 2-minute tour ×

Right Now I have this chart: http://i.stack.imgur.com/xyyNX.png

I'd like to get the vertical grid to show. I can't find out how to do it. If possible, I'd like to replace the dashed lines too.

Here's the code I'm using to plot that (ignoring the irrelevant parts like actually creating the chart and adding the data):

XYPlot plot = chart.getXYPlot();
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

A similar approach works in this JFreeChartDemo. You might compare it to your code. You can change the lines' appearance using setDomainGridlineStroke() and setRangeGridlineStroke().

share|improve this answer
add comment

Your Answer


