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

0
0

It seems most of the modifiers bring up tooltip data with a pan, and then it goes away when the user lifts their finger. Is there any way to bring up tooltip data with a tap (and does not go away when the finger has lifted)? The main problem that we’re trying to solve is that we would like to be able to pan to look at the chart (and don’t want an axis pan), but would also like to bring up tooltip data.

Version
version 3.0
Images
  • You must to post comments
0
0

Hi there,

You can create a custom RolloverModifier and ignore touch up event ( don’t call super implementation ). Also you need to change touch down handler, because if there will be no touch up then there should be only one touch down event:

class CustomRolloverModifier extends RolloverModifier {
    private boolean isFirstTouch = true;

    @Override
    protected boolean onTouchDown(ModifierTouchEventArgs args) {
        // place tooltip on first touch only and ignore other touch down events because tooltip should remain on screen
        if(isFirstTouch) {
            isFirstTouch = false;
            return super.onTouchDown(args);
        } else
            super.onTouchMove(args);
        return true;

    }

    @Override
    protected boolean onTouchUp(ModifierTouchEventArgs args) {
        // ignore touch up event
        return false;
    }
}

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.