Pre loader

RenderableSeries Hit-Test not working as expected

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

RenderableSeries Hit-Test is not working as expected. Some bugs on the the RenderableSeries Hit-Test. Distance between two points are less then its working most of the time and getting the isHit variable getting true. But the distance is high then the lines near to the point only getting the isHit true. I am attaching the image when the red marked area is working fine and the blue marked area not working.

  • You must to post comments
0
0

Hi Arun,

I’ve done some testing today. I created an example which you can run here for the Hit-Test API:
https://github.com/ABTSoftware/SciChart.JS.Examples/tree/dev/Sandbox/CustomerExamples/HitTestingPointsDemo

This seems to be working fine. Can you test it out?

enter image description here

Best regards,
Andrew

  • Arun Surendran
    Thanks Andrew Burnett-Thompson.. I have checked the example provided by you. Only change i have made is xValues: [0,1,2,3,4,5,6,7,8,9], yValues: [0,1,5,1,20,5,1,8,9,3]. Please look the attached gif or zip file on the question. When hitting on the points its working fine. But when hitting on the lines the points going somewhere else and not getting the isHit value true.
  • Andrew Burnett-Thompson
    Aha! Got it. Thanks Arun, wow that is a strange bug indeed. Investigating
  • You must to post comments
0
0

Hi Arun

This is looking a lot better. Will be publishing a fix for this shortly.

enter image description here

Best regards,
Andrew

  • Arun Surendran
    Any Update on this? Still not released the bug fixes?
  • Andrew Burnett-Thompson
    Hi Arun, yes this fix has been released. Have you trie the hit-testing demo that I shared above? Clone this repo and npm install in this folder, then npm start. Check it works. It seems to be working fine (hit-testing the nearest point) on my machine https://github.com/ABTSoftware/SciChart.JS.Examples/tree/dev/Sandbox/CustomerExamples/HitTestingPointsDemo. If you need a different behaviour or spot an issue let me know
  • Arun Surendran
    Hi Andrew Burnett-Thompson, Sorry for the late response. I was working on some other functionality. Now I checked on the example and updated one zip file (19-May.zip). Can you check that. My mouse pointer is on the exact line and why the hit is showing miss? When clicking on the line or point what i expect is hit and clicking outside miss is the expected behavior.
  • Arun Surendran
    Hi Andrew, Can you confirm that you saw this comment and you are also getting the same issue. Please check that on the vertical chart also. We are mostly using vertical chart and its not working as expected.
  • Andrew Burnett-Thompson
    Hi Arun, I’ve reported this task in our task board https://abtsoftware.myjetbrains.com/youtrack/issue/SCJS-625. Best regards, Andrew
0
0

Hi Arun,

I updated the HitTestingPointsDemo example.

There are two pieces that need to be changed in order to show isHit each time you click on the line:
1. You should use ENearestPointLogic.NearestHorizontalPoint instead of ENearestPointLogic.NearestPoint2D, it will search for the nearest horizontal point.
2. You should set the interpolate flag to True. If True the line is hit-tested, otherwise the point.

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

The updated example can be found here.
This is the commit I made.

The image is attached.

Best regards,
Michael

Images
  • Arun Surendran
    Hi Michael Klishevich. I checked the example. Its working. But on our application its showing some inaccuracy. Give me little time. I will update with the issue.
  • Arun Surendran
    Hi Michael Klishevich, I have updated one zip file on the question (Example Update.zip). Can you please check the video and the code. Only change i have done their is the data values is 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.
  • You must to post comments
Showing 3 results
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