Pre loader

Manual Y Axis Zoom - Rubber bend effect

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,
Im tryin to create an effect where I have a static point on the Y Axis and I want to perform zoom in, so what I did is to increase or decrease the Max visible range, what I’m left with is the rubber band effect where my static point isn’t static anymore because the point in “Stretching” in the direction I’m zooming.

Version
2.1.0.2125
Images
  • You must to post comments
0
0

Hello,

I’m not sure if that’s what you want, but from what I understand – you want to be able to zoom in and leave you point in place (let’s say it’s in the middle of Y Axis).

What I would suggest – is to Listen to VisibleRange Changes as described here and amend your visibleRange as you need.
So let’s say your starting range is [0;2], your zooming in, and your point is 1 on Y axis. You zooming in and the newRange in callback is [0.5;1.6], which makes your point being off centre. Here you would want to change it to be [0.5;1.5], this way your point is right in the middle of Y axis. And so on.

Instead of doing this in callback, you can try to write your custom modifier (in which you will use something similar), we do have a great article about implementing custom modifiers here.

Hope that helps.

Best Regards,
Nazar.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.