Integer tick values

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Joao Guilherme Del Valle

Integer tick values

Post by Joao Guilherme Del Valle » Fri Nov 30, 2001 6:37 pm

Hi,

Even if an Axis has only integer values, there are tick with values with comma. Can I workaround this?

The case: I´m building a vertical bar chart showing access to some commands of the my system. The chart is drawn with numbers with fraction digits.

I tried to use the constructor VerticalNumberAxis3D(String, Font, Paint, Insets, boolean, boolean, Font, Paint, Insets, boolean, Stroke, boolean, boolean, Number, Number, Number, boolean, NumberTickUnit, boolean, Stroke, Paint, double), with default values, except:
- autoTickUnit=false
- tickUnit=new NumberTickUnit(new Long(1L), new DecimalFormat("0"))

It didn´t worked very well, if values grow bigger, the ticks will overlap.

Any suggestion?

David Gilbert

RE: Integer tick values

Post by David Gilbert » Fri Nov 30, 2001 7:04 pm

Hi Joao,

At the bottom of the constructor in the NumberAxis class you will see:

this.standardTickUnits = createStandardTickUnits();

Take a look at the way these are created. What I intended was to have a method setStandardTickUnits(...), but I must have forgot to add it. So you could create your own collection of standard tick units, and set these for the axis.

Regards,

DG.

Locked