Home › forums › Using CanvasJS › How to stopPropagation when click data point?
Tagged: click, event
This topic contains 5 replies, has 2 voices, and was last updated by Vishwas R 10 months, 1 week ago.
When I dealing with ‘click’ event as below page told.
I found the event I got is not the native event, but I really need the ability to stopPropagation of the click, is it some where possible in current canvasjs?
Can you kindly brief us the behavior you are expecting along with the use-case, so that we can understand it better and help you out?
Let me explain what I met.
I want to have the ability to click any position of the chart to trigger a seek event of my video. So I use the solution provided here https://canvasjs.com/forums/topic/click-event-for-any-cursor-position/.
But I found that due to the density of the data, above link would cause an issue, that is, visually user clicked on the data point, but seek to some neighbor frame. So now I use the default click call back provided by canvasjs , and combine with above link. The issue is, when default callback function is triggered, the solution function in above link also triggered. Thus the seek would be overwrite, and the seek still failed.
Right now, I already found a temporary solution. That is, use a last click time variable to detect the last time the event triggered, to stop the propagation of the action. But I hope canvasjs could provide the native support to this, because I still has issue to below case:
1. when zoomed, the pan button or reset button still propagate the event to up layer, I didn’t found the callback to pan or reset button call back to do my time trick.
2. when use range selection to zoom chart, it also triggered a click event.
So my suggestion is, to all click event in the canvasjs, defaultly stop propagation, or provide option to achieve this.
Did I make my idea clear?
Thanks for the suggestion. We will reconsider the behavior in future releases.
Do you have any progress on this feature, or provide an alternative way to allow me suppress the reset button event propagation?
I specifically want the pan button and reset button stop propagation.
Sorry to inform you that we are working on some other important features at this point of time because of which we have added your request to our list to reconsider in our future releases.
You must be logged in to reply to this topic.