How to fix the increment value of the range axis?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
josafassj
Posts: 10
Joined: Sat Jul 26, 2008 1:24 pm

How to fix the increment value of the range axis?

Post by josafassj » Mon Mar 30, 2009 3:29 pm

Hi Everybody,

I'm trying to fix the incrementation value of the range axis of my charts.
For example: I have a chart with the minimum range value as 15 and the maximum value as 35. Then my generated chart haves the range values starting with 15 and increasing ramdomly, sometimes adds 2, sometimes adds 3, as: 15,18, 20, 22, 25, 28, 30, 32 and finally 35.

Do I have to override the configure method?

Any idea?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: How to fix the increment value of the range axis?

Post by david.gilbert » Tue Mar 31, 2009 8:18 am

You can subclass the axis and override the refreshTicks() method.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

josafassj
Posts: 10
Joined: Sat Jul 26, 2008 1:24 pm

Re: How to fix the increment value of the range axis?

Post by josafassj » Tue Mar 31, 2009 5:37 pm

It worked.
Thanks David!

Locked