hochileo / achartengine

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

Pan via command #199

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Is it possible to pan to a specific point of a chart? For instance, it I 
zoom in and want to jump to another X-point, which is not inside the zoom-level.

Please provide a source code snippet that we can use to replicate the issue.

something like this would be nice:
mRenderer.setPanXY(10, 0);

What version of the product binary library are you using?
0.70

Original issue reported on code.google.com by robert.lasch85@googlemail.com on 29 Mar 2012 at 2:22

GoogleCodeExporter commented 9 years ago
You can do this in quite an easy way. Calculate the visible area you need to 
pan to and call:
mRenderer.setXAxisMin(min, scale);
mRenderer.setXAxisMax(max, scale);
mRenderer.setYAxisMin(min, scale);
mRenderer.setYAxisMax(max, scale);
and then a repaint.

Original comment by dandrome...@gmail.com on 31 Mar 2012 at 1:24