Pre loader

Reverse zoom level?



I’m using RubberBandXyZoomModifier for zooming and i want to reverse the process.
If i double tap to screen, i want the process to be reversed and back to last zooming level.
Firstly how can I dedect the double tap, and secondly how can I reverse the process?


  • You must to post comments

Thanks for the advice.
And secondly how can i block the full zoom out when i double tap.


  • Andrew Burnett-Thompson
    Hi Dunya, zoom to fit on double-tap is provided by the ZoomExtentsModifier, so if you don’t want that behaviour, simply don’t include it in your chart. Best regards, Andrew
  • Dunya Biralem
    Thank you Andrew.
  • You must to post comments

Hi Dunya,

Unfortunately we don’t support such behavior out of the box, because usually chart contains more than one modifier which modifies VisibleRange of axis (e.g. scroll, pinch zoom, rubber band zoom etc ) so this would require more complex solution to track these changes, because VisibleRange can be changes also by animations, by axis itself during auto range process etc.

If you case is pretty simple you can just set VisibleRangeChangeListener for axis and record all changes when onVisibleRangeChanged() is called and then when it’s needed set VisibleRange values from saved history.

As for double tap – you can achieve this by creating custom chart modifier:

class CustomModifier extends GestureModifierBase {
public boolean onDoubleTap(MotionEvent e) {
    // do something
    return true;

Hope this will help you!

Best regards,

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies