Pre loader

Android Scichart RolloverModifier onTouch MotionEvent.ACTION_UP point

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 scichart to implement a blood pressure chart. But I have to worry about not being able to implement additional features.

What you want to implement is

Using RolloverModifier and onTouchEvent, we need to draw a vertical bar using the canvas class by getting the coordinates of the first checking point at the end of the scroll and the second checking point at the end of the second

However, onTouch does not match the value given by RolloverModifier Tooltip when using montionvent.getX ().

I have been suffering for over a week because of the problem. Please help me.

Version
2.2.0.2348@aar
  • You must to post comments
0
0

Hi Kim,

Well I believe this happens because you need to transform coordinates provided by ModifierTouchEventArgs relative to target container before you can use them. By default ModifierTouchEventArgs provide coordinates relative to SciChartSurface ( whole chart including axes and area where series are drawn) and modifiers like RolloverModifier are placed inside IChartModifierSurface which occupies only center area of chart which doesn’t include axes.

To tranform coordinates you can use methods provided by IHitTestable:
getPointRelativeTo(pointToTransform, getModifierSurface());

Or you can use helper updateCurrentPoint helper method provided by RolloverModifier itself which uses code above under the hood to transform coords provided by ModifierTouchEventArgs:

  updateCurrentPoint(pointWhereToStoreTransformedCoords, args);

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies