Hi All,
In the Free chart, the X-Axis aor the Y-Axis values will have decimal position. If my scale is from 0 to 1, then there qill be eleven entries 0, 0.1, 0.2, 0.3, ...., 1.0. If I want it to be numbers only 0 and 1, what shoule I do??
Are there any methods exposed or some setting to the JFreeChart object??
Please help me in this.
Regards
Girish
Setting X-Axis and Y-Axis values
Re: Setting X-Axis and Y-Axis values
Hi Girish,
what you could do is to specify your own NumberTickUnit:
NumberTickUnit unit = new NumberTickUnit(1.0, NumberFormat.getNumberInstance());
and then
axis.setTickUnit(unit);
(where axis is a NumberAxis)
Regards,
Andreas Schroeder
what you could do is to specify your own NumberTickUnit:
NumberTickUnit unit = new NumberTickUnit(1.0, NumberFormat.getNumberInstance());
and then
axis.setTickUnit(unit);
(where axis is a NumberAxis)
Regards,
Andreas Schroeder