Home Forums Chart Support How to stopPropagation when click data point?

How to stopPropagation when click data point?

Viewing 6 posts - 1 through 6 (of 6 total)
  • #19397

    When I dealing with ‘click’ event as below page told.

    https://canvasjs.com/docs/charts/basics-of-creating-html5-chart/event-handling/

    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?

    #19627

    @intijk,

    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?


    Vishwas R
    Team CanvasJS

    #19673

    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?

    #19676

    @intijk,

    Thanks for the suggestion. We will reconsider the behavior in future releases.


    Vishwas R
    Team CanvasJS

    #22984

    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.

    #22987

    @intijk,

    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.


    Vishwas R
    Team CanvasJS

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.