Is this a bug or ?
XYLineChart doesn't show Y axis values in some specific situations.
example;
x=0, y=3.382265073
x=1, y=3.382265073
x=2, y=3.382265073
x=3, y=3.382265073
x=4, y=3.382265073
...
x=19, y=3.382265073
For other values of y it works well.
Labels are shown correctly.
BUG ? Y axis values not shown
-
- Posts: 3
- Joined: Fri Nov 28, 2003 3:13 pm
- Location: Support Desk
- Contact:
It is a bug in the NumberAxis class - the standard tick unit collection does not have a tick size small enough for the range that is auto-calculated for the axis given a data range of zero. That will get fixed in a future release. In the meantime, one way to avoid the problem is to specify a minimum auto-range for the axis:
Code: Select all
XYPlot plot = (XYPlot) chart.getPlot();
NumberAxis axis = (NumberAxis) plot.getRangeAxis();
axis.setAutoRangeMinimumSize(1.0);
Regards,
JFreeChart Support Team
JFreeChart Support Team
Re: BUG ? Y axis values not shown
Can I follow-up on this thread? This still seems to occur in jfreechart 1.0.9....whenever marker value is at a precision of 1.0e-8 or greater, the y-axis will disappear.
Re: BUG ? Y axis values not shown
Hi!
Not the axis will disappear but the tick marks, right?
You have to provide either a range for the axis, or a suitable TickUnit. This has been discussed earlier. Please search the forum and/or the bug tracker.
hth,
- martin
Not the axis will disappear but the tick marks, right?
You have to provide either a range for the axis, or a suitable TickUnit. This has been discussed earlier. Please search the forum and/or the bug tracker.
hth,
- martin