TimeSeries Chart range problem

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

TimeSeries Chart range problem

Post by maheshd » Fri Jun 18, 2004 1:58 am

I have implemented the PriceVolume demo chart for my dataset .
It works fine when i have data for the primary dataset .
But when the primary dataset (the Y Axis data) is zero then the line is drawn at the center with value 0.000000 rather than starting inline with the X-Axis

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Jun 18, 2004 9:00 am

There isn't a solution for that at present. The code that controls this is in the autoAdjustRange() method in the NumberAxis class, so that's where a modification is required (I won't get a chance to fix this before I go on holiday, so you might want to have a go at it yourself).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

J.
Posts: 17
Joined: Fri Jun 27, 2008 5:30 pm

Post by J. » Thu Jul 03, 2008 2:59 pm

Is there a fix for this problem yet?

J.
Posts: 17
Joined: Fri Jun 27, 2008 5:30 pm

Post by J. » Thu Jul 03, 2008 4:09 pm

Just to say, I managed to solve this (I think!) by initially, when all values in my dataset are zero, setting the NumberAxis with setAutoRange(false). Only once I edit the dataset to add in values do I use setAutoRange(true).

Locked