NikhithaTarala / achartengine

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

Promlems with zooming out #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have another problem with zooming.

In my code, i set pan and zoom limits to the min an max values of my data. now 
i zoom in and pan the chart completly to the side. now i cannot zoom out 
anymore. i have to pan the chart to the middle again so i can completly zoom 
out again.

You can try you demo code AverageTemperatureChart:
Change 
    renderer.setPanLimits(new double[] { -10, 20, -10, 40 });
    renderer.setZoomLimits(new double[] { -10, 20, -10, 40 });
To
    renderer.setPanLimits(new double[] { 1, 12, 5, 30 });
    renderer.setZoomLimits(new double[] { 1, 12, 5, 30 });
Now, pan completly to the left and then try to zoom out.

Also, when i zoom in and out, x and y axis don't alway zoom in the same ratio. 
so it can happen, that after zooming out, the x axis goes from min to max of my 
values, but the y values don't fit in the chart anymore.

Thanks
Harald

Original issue reported on code.google.com by harald.k...@gmail.com on 26 Jul 2011 at 9:31

GoogleCodeExporter commented 9 years ago
This is not a bug.
It calculates to see if zoom out would bring the view outside of the forced 
zoom limits and if so, it will not zoom out. That's the goal for zoom limits.

Original comment by dandrome...@gmail.com on 27 Jul 2011 at 3:53

GoogleCodeExporter commented 9 years ago
Hm, for me it is strange that if I zoom in, move to the left and then cannot 
zoom out anymore. It is right, that the zoom limit on the ONE side is reached, 
but then I would expect that it zooms out on the other side, until BOTH zoom 
limits are reached?

Original comment by harald.k...@gmail.com on 27 Jul 2011 at 6:12