Displaying horizontal grid lines for a particular axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tox0tes
Posts: 34
Joined: Tue Aug 05, 2008 7:05 pm

Displaying horizontal grid lines for a particular axis

Post by tox0tes » Tue Sep 02, 2008 9:14 pm

I added additional axes to my XYLineChart and I was wondering how to specify which axis displays horizontal grid lines. Thanks.

RichardWest
Posts: 844
Joined: Fri Oct 13, 2006 9:29 pm
Location: Sunnyvale, CA

Re: Displaying horizontal grid lines for a particular axis

Post by RichardWest » Thu Sep 04, 2008 2:06 am

tox0tes wrote:I added additional axes to my XYLineChart and I was wondering how to specify which axis displays horizontal grid lines. Thanks.
XYPlot JavaDoc wrote:protected void drawRangeGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.util.List ticks)
Draws the gridlines for the plot's primary range axis, if they are visible.
The displayed gridlines will always be drawn with respect to the primary axis which is the axis with index 0 (or the only axis when there is a sole axis). You will have to modify the code if you want to change this behavior. It would be easier to simply change which axis is fhe primary axis though.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

Locked