NikhithaTarala / achartengine

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

XY Chart: Setting a pan limit doesn't prevent it from "zooming-out" to areas outside the limit. #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set a pan limit (horizontal in this case), enable zoom

renderer.setXAxisMin(xAxisMin);
renderer.setXAxisMax(xAxisMax);
renderer.setPanLimits(new double[] { xAxisMin, xAxisMax, 0, 0 });

2. Pinch in to zoom out

3. It is possible to zoom out to the point where the areas outside the pan 
limits are visible.  Especially if you zoom-in first, pan to one end of the 
chart, then zoom-out.

What is the expected output?

I would expect that the zoom would never expose areas of the chart I made 
invisible by setting panning limits.

What version of the product binary library are you using?

Using latest SVN sources.

Original issue reported on code.google.com by zvasv...@gmail.com on 11 Jan 2012 at 3:05

GoogleCodeExporter commented 9 years ago
It is recommended that you set the zoom limits when you are setting the pan 
limits. This way, you will avoid the behavior you described.
renderer.setZoomLimits();

Original comment by dandrome...@gmail.com on 11 Jan 2012 at 4:36

GoogleCodeExporter commented 9 years ago
Thanks, but not sure why you would ever want to have a Zoom Limit which is 
outside of the Pan Limit.   I'd suggest clamping the zoom to the pan by default.

Please close this issue.

Original comment by zvasv...@gmail.com on 12 Jan 2012 at 1:08