A question: XYPlot Zoom vs CombinedDomainXYPlot Zoom

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Mercer
Posts: 11
Joined: Mon Jun 05, 2006 6:55 pm

A question: XYPlot Zoom vs CombinedDomainXYPlot Zoom

Post by Mercer » Mon Jun 05, 2006 7:13 pm

Hi, just a question regarding the mouse-zoom abilities. It's not a question of getting it to work, more of a question regarding whether this is the way it was intended to work or not.

In the course of our application, both XYPlots and CombinedDomainXYPlots are used (as well as others, of course). When using the mouse zoom (ie drawing boxes and zooming in the domain relative to that box), both charts behave exactly the same.

It is on the zoom out that I have a question. Currently the easiest method of zooming-out is by drawing a 'negative' box. Meaning a user creates a box by clicking and dragging LEFT. No box is actually drawn, but JFreeChart wonderfully inteprets this as a 'please zoom me all the way out' instruction. Found it by accident, works great, REALLY convenient once you're aware it exists. You can FLY through several sections of the chart in a fraction of the time it would take to manually hit buttons or create zoom margins.

Now, when one makes this 'negative' box on a CombinedDomainXYPlot, JFreeChart decides that fully zoomed out means displaying every obtained point. Example, if the domain is a time reference and you had a week worth of data in there, a negative box would redraw to show you the entire weeks worth of data. This is exactly the action wanted.

However! (I had to come to the point eventually right?) When you make the negative box on a XYPlot, the fully zoomed-out decision is only one hour. Regardless of how much data you have stored in there. Even if you were previously looking at three days data, a negative box zoom-out takes you down to one hour. One can eventually zoom all the way out by right-clicking and navigating your way through that menu, but to go from one hour to a week requires several trips that route. Very inconvenient.

I guess what I'm asking is, is this expected behaviour? Is there a good reason I'm unaware of why certain uses of an XYPlot would require this?

And let's be honest, I'm also asking if there's some way I can make the XYPlot behave the same way as the Combined Plot. Any ideas?

Thanks for any insight on this folks. This forum has gotten me and my team out of several touchy problems.

Cheers.

Locked