skone
Posts: 18
Joined: Mon Apr 19, 2021 2:41 pm

Disable Pie Chart Click

Hi,

I would like to disable the click event on the pie charts slices. I still want to display the tooltip as normal though. I tried the click event, but could not get it working. Would you mind showing an example on how to do that?

Thanks,
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Disable Pie Chart Click

Hi skone,

Thanks for contacting us with your question.

Please add this piece of code to your series config and let me know it if helped:

Code: Select all

    events: {
      click: function(e) {
        e.preventDefault(); // prevent any action from occuring on "click" event
      }
    },
Demo: https://jsfiddle.net/BlackLabel/Lnvrscq9/

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”