autorange with min value=0

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Keith Iosso

autorange with min value=0

Post by Keith Iosso » Sun Dec 03, 2000 2:43 am

Hello,
I am generally delighted with this tool. I am using the autoranging and it mostly seems to work pretty well. I don't care whether my graphs include 0 and choose the option accordingly. When the lowest value in the graph is 0, suddenly there is no space below the 0. Data on the 0 axis then disappears.
For my purposes it would be better if there was always space below the vertical axis, even if the lowest value=0. Looking at the code, I see a test for "!=0" on lines 194 and 195 that is causing the problem. I can understand that approach when the option AutoRangeIncludesZero is true, but not otherwise. Although it has a problem in that when data = 0, it doesn't show on the chart.
Is this really how you want the autoscaling to work? I can fix the code myself for my own purposes if you want it to continue that way, but won't if you agree that it would be better without and want to change it in the real releases.

Thanks for listening
Keith

Keith Iosso

RE: autorange with min value=0

Post by Keith Iosso » Sun Dec 03, 2000 2:44 am

Oops, I meant to say lines 194 and 195 of VerticalNumberAxis.java.

Keith

David Gilbert

RE: autorange with min value=0

Post by David Gilbert » Mon Dec 04, 2000 8:14 am

Keith,

I'll fix the problem as soon as I can.

I'm now using the bug-tracking features on SourceForge (so I don't forget anything!) and this bug has been assigned ID 124318.

Regards,

DG.

Locked