RangeAxis tick label suffix

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

RangeAxis tick label suffix

Post by Simon » Thu Sep 19, 2002 11:36 am

Hi

My RangeAxis is a percentage on my chart, but I would like to get the tick labels to display a percentage sign as a suffix.

Does anyone know how I can do this?

Regards
Simon

David Gilbert

Re: RangeAxis tick label suffix

Post by David Gilbert » Fri Sep 20, 2002 11:10 am

If you want automatically adjusting tick sizes, you need to create your own TickUnits collection, so that you can specify your own DecimalFormat objects for each standard tick size (DecimalFormat can format percentages). If I find the time, I'll add a default collection to the TickUnits class for the next release.

Or, if you have a fixed tick size, just create a new NumberTickUnit (again supplying a DecimalFormat instance that formats percentages) and then use the setTickUnit method in the NumberAxis class.

Regards,

DG.

Locked