Pre loader

RenderableSeries Hit-Test Still having some issues.

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

1
1

Hi Scichart Team,
RenderableSeries Hit-Test still having some issues. I saw that the bug on your board is already closed state and my last comments are missed on the bug. So i am adding the same here.

https://www.scichart.com/questions/js/renderableseries-hit-test-not-working-as-expected

Can you please check the video and the code. Only change i have done on the Example is the data values are updated. On the video you can saw the clicking outside for some area Hit is showing, some area miss is showing, and clicking on the lines or point also showing the same. Let me know you need any more inputs from my side.

Version
1.4.1604
Attachments
  • You must to post comments
0
0

Hi Arun,

If you need to hit-test lines you should call the hitTest function like this:

const hitTestInfo = lineSeries.hitTestProvider.hitTest(
        mousePoint,
        ENearestPointLogic.NearestHorizontalPoint,
        HIT_TEST_RADIUS,
        true
);

You should use NearestPoint2D (to find nearest point on the surface) or NearestHorizontalPoint (to find the point with nearest X value) and interpotation = true. We had a bug which manifested itself when line charts have almost vertical segments like in your example. We are calculating distance from the line and hit test result was true if to click on the line which continues the segment even if it was far away from it. It was fixed in [email protected].

However please keep in mind how the hit-test api works for line charts when NearestPoint2D and interpolation=true:
1. We find the nearest point.
2. We take adjusting point to the nearest point from the side where click was made. If click was made from the right of the nearest point the adjusting point is next to the right.
3. Two points (the line segment) give us a line and we calculate the distance. If the distance is less than HIT_TEST_RADIUS it is hit.
4. We take into account length of the line segment to exclude cases when we click on continuation of the segment far away from it. This bit was fixed.

Please refer the image.

Images
  • 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