Time Series Chart Y-axis problem

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

Time Series Chart Y-axis problem

Post by reji » Tue Sep 03, 2002 2:27 am

Hi,

When all the dataset value becomes same [ for eg. 250.0 ] then time series Y-axis range shrinks to one point [ 250.0 ]. How to change this feature? I would like to have Y-axis minimum range as 0.0 always and varying max range value.

I know how to set min and max range manually. But In case of dynamic charts it is not advisable to process all the dataset values and find min and max range values for every refresh time.

Is there any method to get the maximum value for a series? Then it will be helpfull for me to set the max range value..

thanks in advance,

reji

Kadi

Re: Time Series Chart Y-axis problem

Post by Kadi » Tue Sep 03, 2002 8:37 am

Try this

NumberAxis valueAxis = new VerticalNumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(true);

Locked