Pre loader

Reverse zoom level?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi,

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?

Tnx.

Version
3.0
  • You must to post comments
0
0

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 {
@Override
public boolean onDoubleTap(MotionEvent e) {
    // do something
    return true;
}
}

Hope this will help you!

Best regards,
Yura

  • You must to post comments
0
0

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

Tnx.

  • 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
Showing 2 results
Your Answer

Please first to submit.