BUG: CombinedDomainXYPlotDemo un-zoom mis-sets domain axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
purduephotog
Posts: 17
Joined: Wed Nov 10, 2004 11:29 pm

BUG: CombinedDomainXYPlotDemo un-zoom mis-sets domain axis

Post by purduephotog » Tue Mar 13, 2007 5:26 pm

Would someone confirm this is a problem and just not me?

To reproduce:

Start the 1.0.4 Demo code.
Choose 'Combined Axis Charts'
Choose 'CombinedXYPlotDemo4' (valid with nearly every other combined chart)

In the top chart panel, zoom in on a region (I picked 3x line intersecting).
In the bottom panel, drag the mouse backwards/upwards to un-zoom.

Note that the top panel did not return to the proper range. 'unzooming' the top panel restores it.

Repeating the above steps with the zoom bottom panel, unzoom top panel repeats the error.

Confirmation welcome... ?

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 » Wed Mar 14, 2007 2:10 pm

This is intentional. The domain (X) axis is shared by both subplots, so a zoom on one subplot will alter the domain values displayed on the other. But the range (Y) axes on the two subplots are independent, so a zoom on one subplot won't affect the range axis on the other subplot.
David Gilbert
JFreeChart Project Leader

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

purduephotog
Posts: 17
Joined: Wed Nov 10, 2004 11:29 pm

Post by purduephotog » Wed Mar 14, 2007 2:46 pm

david.gilbert wrote:This is intentional. The domain (X) axis is shared by both subplots, so a zoom on one subplot will alter the domain values displayed on the other. But the range (Y) axes on the two subplots are independent, so a zoom on one subplot won't affect the range axis on the other subplot.
Thanks Dave-

I couldn't figure out the word I needed yesterday- what I meant was 'zoom out'. So if I zoom out on one display I need to zoom out on the other graph as well...

I may just end up integrating everything with JPanels on my own chart frame then.

Thanks very much- you've been very helpful!

Jason

RichardWest
Posts: 844
Joined: Fri Oct 13, 2006 9:29 pm
Location: Sunnyvale, CA

Post by RichardWest » Wed Mar 14, 2007 5:14 pm

purduephotog wrote:So if I zoom out on one display I need to zoom out on the other graph as well...
If you are looking to have several charts share both the domain and range axis, I posted a class that will do this. Take a look at http://www.jfree.org/phpBB2/viewtopic.php?t=20395 ("request: CombinedDomainAndRange*Plot") and see if it meets your needs. Any and all feedback would be appreciated.

Hope this helps,
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

Locked