Hi,
i created a simple Line Chart following an example.
The chart has put on a PDF document as image.
JFreeChart set automatically the values on X and Y Axis, i want to define different range ont he Axis.
For instance :
the values on Y Axis are : 0,500,1000,1500,2000
the values on X Axis are : 0,50,100,150,200,250,300,350,400,450,500,600
I want to display values on X Axis such as : 0,10,20,30,40,50....
In this way my chart will more detailed.
Moreover my chart is not displayed clear, it seems that i have to set a scale or something like that.
Any suggestion ?
Cheers.
Stefano
[/img]
How to set different range on X Axis
-
- Posts: 15
- Joined: Fri Jul 28, 2006 4:31 pm
setTickUnit
Hello,
Tick unit for the axis is normally automatically selected from a collection of standard tick units. You may try this:
...
axis.setAutoTickUnitSelection(false);
axis.setTickUnit(new NumberTickUnit(50));
...
Hope that helps, Willi
Tick unit for the axis is normally automatically selected from a collection of standard tick units. You may try this:
...
axis.setAutoTickUnitSelection(false);
axis.setTickUnit(new NumberTickUnit(50));
...
Hope that helps, Willi