Home Forums Chart Support Click event from tooltip

Click event from tooltip

Viewing 4 posts - 1 through 4 (of 4 total)
  • #29162

    Is it possible to receive a click event from a tooltip? The solution in this post does not work for me:

    https://canvasjs.com/forums/topic/can-we-define-a-tooltip-click-event/

    The solution provided in the fiddle does not raise a cleck event when I run it. I am using Chrome.

    Thanks,
    Stefan

    #29172

    Stefan,

    Thanks for reporting the use-case to us. Setting pointer-events to ‘auto’ should work fine in this case. We have updated the JSFiddle with the same.


    Vishwas R
    Team CanvasJS

    #29191

    Visjwas,

    many thanks, now with this the jsfiddle example is working.

    However, now I seem to be facing a scope issue when applying this in my Angular application. I have created the chart within the ngOnInit methode of a component. The click event hanlder onClickToolTip is defined in that component, too. But when I click the tooltip, I am getting the following error:

    ReferenceError: onClickToolTip is not defined at HTMLDivElement.onclick

    Do you have an idea in how I can reference the event handler correctly?

    Many thanks,
    Stefan

    #29200

    Stefan,

    Can you kindly create sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with sample data so that we can run the code at our end locally, understand the scenario better and help you resolve?

    From what we have observed, sometimes things get delayed mostly when we are not able to reproduce the issue or not able to understand the exact requirements or the solution that we provide may not work properly due to the variation in chart-options being used by you and us.

    Having a sample project helps us in figuring out the issue and suggesting an appropriate solution accordingly.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.