A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
am
- Posts: 22
- Joined: Mon May 09, 2005 4:56 pm
Post
by am » Wed Aug 24, 2005 3:31 pm
I just need to be able to detect when the user choses the option from the drop down menu to zoom in on both axis.
Is there any way to do this..
Thank you to anyone who replies or even has a look at this problem..
Cheers

-
skunk
- Posts: 1087
- Joined: Thu Jun 02, 2005 10:14 pm
- Location: Brisbane, Australia
Post
by skunk » Wed Aug 24, 2005 4:36 pm
I use code like this to detect if the xAxis is zoomed
Code: Select all
if ((xAxisRange.getLowerBound() >= xAxisDataRange.getLowerBound()) ||
(xAxisRange.getUpperBound() <= xAxisDataRange.getUpperBound()))
-
am
- Posts: 22
- Joined: Mon May 09, 2005 4:56 pm
Post
by am » Wed Aug 24, 2005 4:59 pm
xAxisRange.getLowerBound()
xAxisDataRange.getLowerBound()
xAxisRange.getUpperBound()
xAxisDataRange.getUpperBound()
Could you please just explain the variables you have used.. but thanks for replying..

-
skunk
- Posts: 1087
- Joined: Thu Jun 02, 2005 10:14 pm
- Location: Brisbane, Australia
Post
by skunk » Wed Aug 24, 2005 6:06 pm
Code: Select all
ValueAxis xAxis = (ValueAxis)xyplot.getDomainAxis();
Range xAxisDataRange = xyplot.getDataRange(xAxis);
Range xAxisRange = xAxis.getRange();
-
am
- Posts: 22
- Joined: Mon May 09, 2005 4:56 pm
Post
by am » Thu Aug 25, 2005 4:34 pm
Thanks for the help.. with the code segment you gave me.. I have managed to minipulate it and carry out the task i required..
So
thanks again!!!
Am 