Getting the active tick unit from the standard ticks units

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
admm
Posts: 3
Joined: Sat Mar 27, 2004 1:13 am

Getting the active tick unit from the standard ticks units

Post by admm » Sat Mar 27, 2004 1:35 am

I'm having a problem similar to that described in this post http://www.jfree.org/phpBB2/viewtopic.php?t=7360

However, instead of forcing an extra tick mark to appear at my maximum dataset value, I'd willing to use the (hopefully) easier solution of adding one tick unit to the axis upper bound.

I haven't been able to figure out how to retrieve the size of the tick unit being used in the chart. I'm letting JFreeChart automagically determine the tick unit size, and I'd prefer to keep it that way because I don't want to screw up the tick labels. But since the standardTickUnits is a set of possible tick units, it doesn't help me figure out which tick unit is actually in use. Anyone know how to do this? Is it even possible in the current version?

-Adam

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

Post by david.gilbert » Mon Mar 29, 2004 11:00 am

The getTickUnit() method should return the correct value, but only after the chart has been drawn (the tick unit is selected as the chart is being drawn, since the chart size is not known until drawing time).
David Gilbert
JFreeChart Project Leader

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

Locked