Adding dot lines in the grid

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
rvijaiganesh
Posts: 19
Joined: Wed Mar 09, 2011 2:11 pm
antibot: No, of course not.

Adding dot lines in the grid

Post by rvijaiganesh » Tue Mar 22, 2011 5:34 pm

Hi,

Is it possible to add dot lines in the grid only for the selected values.For example the y-axis value is (0,25,50,100,125,150,175,200) .In that i want to add dot lines (with specific color) only the value containing 100 and 200.For other values it should be straight line..

Code: Select all

plot.setRangeGridlinesVisible(true);
        plot.setRangeGridlinePaint(Color.LIGHT_GRAY);
        plot.setRangeGridlineStroke(new BasicStroke(1.0F));
Please give any sample...

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Adding dot lines in the grid

Post by paradoxoff » Tue Mar 22, 2011 10:21 pm

This is not supported. You could add ValueMarkers at the respective positions, but these will be shown in addition to the grid lines and not instead of them.

rvijaiganesh
Posts: 19
Joined: Wed Mar 09, 2011 2:11 pm
antibot: No, of course not.

Re: Adding dot lines in the grid

Post by rvijaiganesh » Wed Mar 23, 2011 7:08 am

How to add the value markers...Give any sample for that...

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Adding dot lines in the grid

Post by paradoxoff » Wed Mar 23, 2011 6:12 pm

Some sample code is here.
You would simply have to exchange the call plot.addRangeMarker(new ValueMarker(upper)) with plot.addDomainMarker(new ValueMarker(upper))

Locked