I have a real time updated chart and users can add annotation to the chart. The position of the annotation will be updated with the chart data. I would like to stop updating the annotation position while user dragging the annotation. So I added a flag (e.g. isDragging) to the annotation dragStarted and dragEnded events. The isDragging flag will be set to true in dragStarted and then set to false in dragEnded. I will check this flag before updating the annotation position.
Here’s the problem, the annotation dragStarted event will be triggered when users do panning in the chart. But the dragEnded will not be triggered in this case. It breaks my plan to stop updating the annotation position as the isDragging will be incorrect. Is it a bug that the annotation dragStarted event (but not the dragEnded event) triggered when panning?
- Quyen Sy asked 2 years ago
-
Sounds like you may have found a bug. Create a codepen to reproduce it? See https://www.scichart.com/blog/codepen-codesandbox-and-jsfiddle-support-in-scichart-js/
- You must login to post comments
Hi Andrew,
I have created a simple example with codepen:
Steps to reproduce:
1. Start the demo with the console opened.
2. Drag the annotation. You will see the logs “drag started – isDragging: true” and “drag ended
– isDragging: false” as expected.
3. Pan the chart. You will see the logs “drag started – isDragging: true”.
- Quyen Sy answered 2 years ago
-
Fantastic! Thank you, will look into it
-
Update: One of our team is investigating this. Will reply back when we have some news
- You must login to post comments
Hello, a bugfix for this issue was published in v3.0.317 of the library.
Please, try it out and let us know if it works as expected on your side.
- Jim Risen answered 2 years ago
-
Hi Jim, it works well now. Thanks!
- You must login to post comments
Please login first to submit.