gorteganesh / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Zoom reset button #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Besides the zoom in/zoom out buttons, a zoom reset button would be handy.

Original issue reported on code.google.com by barry...@gmail.com on 17 Nov 2010 at 8:52

GoogleCodeExporter commented 9 years ago
Fixed in svn rev. r100.

Original comment by dandrome...@gmail.com on 26 Nov 2010 at 4:37

GoogleCodeExporter commented 9 years ago
Well, it is working, but when I press the Zoom to fit button, the graph shifts 
up. When I have values starting with 0, the 0 values are precisely on the 
bottom of the graph. After zoom fit, it is a little bit higher.. See also the 
test code from http://code.google.com/p/achartengine/issues/detail?id=25#c2

Original comment by barry...@gmail.com on 29 Nov 2010 at 9:00

GoogleCodeExporter commented 9 years ago
In addition, It automatically detects the values, which is okay, but when you 
only set the Zoom Enabled on the X-axis, the Y-axis should stay the same. Now 
they are also resizing..

Original comment by barry...@gmail.com on 30 Nov 2010 at 12:11

GoogleCodeExporter commented 9 years ago
Fixed in svn rev. r101.

Original comment by dandrome...@gmail.com on 3 Dec 2010 at 11:28

GoogleCodeExporter commented 9 years ago
I hope I'm not irritating you, but I was wondering about something.
In this issue, the function is described as a Zoom reset button, the 
implementation speaks of an ZoomFit option. But the function actually is a 
ZoomReset (If I see this right).
I have the following situation:
- I define the X and Y-axis Min/max to display the area I want to display. 
(i.e. last 30 days)
- I define the Pan limits to the start/end of the data (for i.e. the whole year)
- I enable only X-axis panning/zooming.

Now you see the last 30 days first, but are able to scroll to the left to see 
older data. This works fine. Now to the current issue, there are 3 
possibilities for the reset/fit button:
1. When nog x/y-axis set, zoom to display everything (which is the same as the 
initial screen)
2. Reset the zoom, to the initial stage, according to X/Y-axis min/max (if set)
3. Fit the zoom, to display all the data, including everything hidden in the 
beginning.

Option 1/2 is implemented is r101, but I'm wondering if option 3 isn't a more 
preferred option, if panning is enabled. For my particular situation, it would 
be, so I've added  initialRange = panLimits; to XYMultipleSeriesRenderer.java 
after line 565 (setPanLimits(double[] panLimits) function), so the initial 
range is overwritten when the setPanLimits is called after the setX/Y min/max 
function..

I was wondering what your opinion about this was.

Original comment by barry...@gmail.com on 3 Dec 2010 at 1:52