Pre loader

How to scale axes with different scale factor using pinch zoom?

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

How to scale axes with different scale factor using pinch zoom?
For example, scale x axis only or scale x axis greater then y axis.

Version
latest available for download
  • You must to post comments
0
0

If anyone is still looking at this like I was please check your version they have added this feature and forgot to update the documentation so please check that you are running the latest version

  • You must to post comments
0
0

Thank you for sharing very interesting information. I have always been interested in the topic. It’s very cool to be able to create any item you want! So once again thank you! I will be glad if I help someone too. If you have problems writing all sorts of articles but you need it in your studies, I can suggest you contact them buy term paper. Have a nice day!

  • You must to post comments
0
0

Hi Dmitry,

If you need to disable pinch zoom in X or Y direction then you can set XyDirection for PinchZoomModifier.
So if you need to pinch only x axis you just need to use code like this:

 pinchZoomModifier.setXyDirection(XyDirection.XDirection);

Regarding the second part of your question – our default PinchZoomModifier implementation uses Android’s ScaleGestureDetector which doesn’t provide seperate scale factor for X and Y direction so for now it isn’t possible to pinch X and Y axes with different scale factors but it is possible to create to custom PinchZoomModifier and ajust scale factors if it is needed.

 public class CustomPinchZoomModifier extends PinchZoomModifier {

    /**
     * Performs a zoom around the passed in point by the specified X and Y factor
     *
     * @param point  The mouse point.
     * @param xValue The x zoom factor.
     * @param yValue The y zoom factor.
     */
    @Override
    protected void performZoom(PointF point, double xValue, double yValue) {
        super.performZoom(point, xValue * 2, yValue); // double scale factor in X direction
    }
}

Hope this will help you! If you have other questions please feel free to ask.

Best regards,
Yura

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.