Maximum amount of ticks using auto range

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
liferiot
Posts: 6
Joined: Thu Feb 18, 2010 1:44 pm
antibot: No, of course not.

Maximum amount of ticks using auto range

Post by liferiot » Thu Feb 18, 2010 3:16 pm

I wonder if there is a possibility to use the auto range mode of an axis and specifying the maximum amount of ticks!?

e.g. it is very ugly if you have auto range minimum size 1 and no values in the chart and the ticks are
"0 - 0.05 - 0.1 ... 1"

i would like to have something like

setTickMaxAmount(6)

-> "0 - 0.25 - 0.5 .. 1" or "0 - 0.2 - 0.4 ... 1"

i know that i can set the tick size. but if there can occur any value there is a lot of programming to set it properly.

or in short:
with auto range JFreeChart produces too many ticks ... any solution to lower this amount?

my problem is not only the ugly looking of many ticks - i also use several axes. and if some of the use 2 or 3 fractions
(if 1 less would also result in enought ticks) the labels are very wide and my chart shrinks.

Locked