Scaling TickUnit in x and y axis.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Christelle
Posts: 6
Joined: Tue Mar 28, 2006 10:45 am

Scaling TickUnit in x and y axis.

Post by Christelle » Tue Apr 25, 2006 1:05 pm

Hi,

I have a chart that shows X-und Y-Axis . But I would like to set the TickUnit dynamically.
Wenn I have much data the TickUnit must be like( setTickUnit(new NumberTickUnit( 50 , new DecimalFormat("0")));

with not much data instead of 50 , I would like somethings like 5 or 10 .
(setTickUnit(new NumberTickUnit(10, new DecimalFormat("0")));

Best Regards

Christelle

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 » Tue Apr 25, 2006 2:08 pm

This is handled by default. If you don't like the "auto selected" units, you can change the list of candidates using the setStandardTickUnits() method in the ValueAxis class.
David Gilbert
JFreeChart Project Leader

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

Locked