jfreechart remove horizontal dotted line

789 views Asked by At

I am getting a lot of problems with jfreechart.

I want to draw a graphic (StackedBarChartGraphic with a DefaultCategoryDataset for input).

I want a graphic like this: desired graph

The problem goes when I get the graphic like this: error graph

I want to remove those horizontal dotted lines at 100, 200, 300 and so on and (also) put a black line at value 0 (i.e. draw the 0 axis as a black line). I tried this:

CategoryPlot plot = (CategoryPlot) chart.getPlot();
plot.setBackgroundPaint(Color.white);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.gray);
plot.setDomainGridlinesVisible(false);
plot.clearRangeMarkers();
plot.clearAnnotations();

And doesn't work. Any ideas? Thanks so much!

0

There are 0 answers