A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
aavanorsystems
- Posts: 1
- Joined: Tue Mar 28, 2006 2:00 pm
Post
by aavanorsystems » Tue Mar 28, 2006 2:04 pm
How to set X & Y axis values in jfreechart and to set the scale for the values dynamically.
for example:
x axis must start with a given time....with minutes in between the scales.
-
gribas
- Posts: 32
- Joined: Thu Jan 26, 2006 5:34 pm
Post
by gribas » Thu Mar 30, 2006 9:03 pm
1. Get the ValueAxis (chart.getXYPlot().getxxxAxis())
2. use the methods
setLowerBound();
setUpperBound();
setTickUnit();
I think you'll have to cast your axis object in order to use the
third method. If it's a TimeSeries try DateAxis, else try NumberAxis.