VerticalNumberAxis, Only formatter for the tick unit£¿

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Weyen

VerticalNumberAxis, Only formatter for the tick unit£¿

Post by Weyen » Tue Jun 25, 2002 2:39 am

Hi

I want y axis to be formatted.
I try this:
NumberTickUnit unit = new NumberTickUnit(0, new DecimalFormat("0.0"));
yAxis.setTickUnit(unit);

But I want size of the tick unit not to be formatted.
I find not like this:
NumberTickUnit unit = new NumberTickUnit(new DecimalFormat("0.0"));
yAxis.setTickUnit(unit);

How I can do?

BTW: please, pardon my poor english ^o^

David Gilbert

Re: VerticalNumberAxis, Only formatter for the tick unit£¿

Post by David Gilbert » Tue Jun 25, 2002 10:10 am

To do that you need to create a collection of tick units (look in the TickUnits class to see how the standard collections are created) and then use:

yAxis.setStandardTickUnits(myTickUnitCollection);

Regards,

DG.

Weyen

Re: VerticalNumberAxis, Only formatter for the tick unit£¿

Post by Weyen » Wed Jun 26, 2002 2:19 am

Thank u !
Your help is always quick

Locked