Auto Range Max Value on XYLineChart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tox0tes
Posts: 34
Joined: Tue Aug 05, 2008 7:05 pm

Auto Range Max Value on XYLineChart

Post by tox0tes » Thu Aug 28, 2008 12:07 am

Is there a way to specify the maximum value for the range axis to display. For example, if I get a value of 100 but I specify the max to be 25, it should still plot 100 but the range axis should only go up to the greatest value of any of the other points less than 25. So, the line would extend beyond the limit of the range axis and disappear.... then come back from the top.

Image

see how the value is way above the range axis, but the range axis does not extend to account for it.

RoyW
Posts: 93
Joined: Wed Apr 23, 2008 7:42 pm
Contact:

Post by RoyW » Thu Aug 28, 2008 4:16 pm

So if the max value is 15 you want the max range to be 15 but if the max value is 100 you want the max range to be 25. Is that correct?

If so take a look at this post.

If you make your dataset implement the RangeInfo interface you can put that logic into your dataset.
The answer does not come from thinking outside the box, rather the answer comes from realizing the truth; There is no Box. my js site

Locked