SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Answered
0
0

Hi,

I’m using the crosshair on the chart and i want to crosshair disappear as soon as i start pinch zoom. So I created a custom PinchZoomModifier and i am doing cursorModifier.setIsEnabled (false) on the onScaleBegin override. But the crosshair does not disappear, it remains steady on the chart, even if I move the chart, it stays at the same point. How can I make crosshair passive when I pinch zoom?

Tnx.

Version
3.1
  • You must to post comments
Best Answer
0
0

Hi Emre,

Our modifiers weren’t design to support enabling/disabling in the middle of touch gesture. By default we hide modifier when on touch up occurs and if you disable it before this event then it just stops processing further events and freezes in its last state. If you want to remove modifier’s tooltips when you disable it then please try to override on onIsEnabledChanged() and call clearAll() explicitly:

 class CustomCursorModifier extends CursorModifier {
    @Override
    protected void onIsEnabledChanged(boolean isEnabled) {
        super.onIsEnabledChanged(isEnabled);

        if(!isEnabled)
            clearAll();
    }
}

Hope this will help you!

Best regards,
Yura

  • You must to post comments
0
0

Yes, it’s worked, thanks.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.