get axis min/max/major/minor

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
DavidThi808
Posts: 106
Joined: Fri May 27, 2005 7:44 pm
Location: Boulder, CO
Contact:

get axis min/max/major/minor

Post by DavidThi808 » Tue Sep 29, 2009 1:10 am

For a dataset how can we get the axis minimum, maximum, major units, & minor units that re the default for that set of data?

thanks - dave

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

Re: get axis min/max/major/minor

Post by david.gilbert » Tue Sep 29, 2009 10:13 pm

You can read this data from the chart's axes, but only after the chart has been drawn - add a ChartProgressListener to the chart, then when you get the event notification saying that drawing is finished, read the values.
David Gilbert
JFreeChart Project Leader

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

DavidThi808
Posts: 106
Joined: Fri May 27, 2005 7:44 pm
Location: Boulder, CO
Contact:

Re: get axis min/max/major/minor

Post by DavidThi808 » Tue Sep 29, 2009 10:42 pm

That will work - we can draw to an off-screen bitmap to get it.

thanks - dave

DavidThi808
Posts: 106
Joined: Fri May 27, 2005 7:44 pm
Location: Boulder, CO
Contact:

Re: get axis min/max/major/minor

Post by DavidThi808 » Tue Oct 13, 2009 4:04 pm

Does JFreeChart have the concept of minor (as opposed to major) tickmarks? It seems like it does not.

??? - thanks - dave

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

Re: get axis min/max/major/minor

Post by david.gilbert » Thu Oct 15, 2009 9:33 pm

There is support for minor tick marks on the axes since 1.0.12.
David Gilbert
JFreeChart Project Leader

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

Locked