Vertical Axis Plot Range

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tony

Vertical Axis Plot Range

Post by tony » Sat Mar 31, 2001 1:35 pm

How can I set the plot range on the vertical axis ?

What I'm doing is to make statistic for my page counter.
As it's a counter, the number of people visit my page can be 0,1,2,3... , of course never be 0.5 or 1.5 .
But JFreeChart shows 1.5, 2.0, 2.5, 3.0... on Vertical axis by default, so I wanna chage the value to like 0,1,2,3,...

How can I make it ? I don't mean I wanna know how to change code.
but I wanna know where I should change at least which method in which file(or class).

Thank you.

tony

Oops...one more. I'm using XYData.

Post by tony » Sat Mar 31, 2001 1:40 pm

I'm using XYData.

David Gilbert

RE: Oops...one more. I'm using XYData.

Post by David Gilbert » Tue Apr 03, 2001 12:41 pm

Try the following (assuming yourAxis is a NumberAxis or one of its subclasses):

yourAxis.setAutoTickValue(false); // in ValueAxis.java
yourAxis.setTickValue(new Double(1.0)); // in NumberAxis.java

Regards,

DG.

Locked