score:48

Accepted answer

You were close. Instead of:

plotOptions: {
    column: {
        pointPadding: 0.2,
        size: '95%',
        borderWidth: 0
    },
    point: {
            events: {
                legendItemClick: function () {
                    return false; // <== returning false will cancel the default action
                }
            }
    },
    allowPointSelect: false,
},

You want:

plotOptions: {
    column: {
        pointPadding: 0.2,
        size: '95%',
        borderWidth: 0,
        events: {
            legendItemClick: function () {
                return false; 
            }
        }
    },
    allowPointSelect: false,
},

score:0

Here is a JSFiddle demonstrating how to achieve this:

plotOptions: {
        series: {
            events: {
                legendItemClick: function () {
                    var visibility = this.visible ? 'visible' : 'hidden';
                    if (!confirm('The series is currently ' +
                   **strong text**              visibility + '. Do you want to change that?')) {
                        return false;
                    }
                }
            }
        }
    }

score:0

from Highcharts JS API documentation (v7.1.1)

"The default action is to toggle the visibility of the point. This can be prevented by calling event.preventDefault()."

So this is what worked for me for Pie charts -

    plotOptions: {
        pie: {
            point: {
                events: {
                    legendItemClick: function (e) {
                        e.preventDefault();
                    }
                }
            }
        }
    }

score:0

As a useful addition to any of the other answers, you might want to disable the legend hover style as well:

legend: {
    itemStyle: {
        cursor: 'default',
    },
    itemHoverStyle: {
        color: '#333333',
    }
},

See: https://jsfiddle.net/oyps4fj6/

score:1

If using ES6 you can make it even shorter with arrow function, as it's pointing to DOM element, you can simply return false...

{
  name: 'Name of this chart',
  type: 'line',
  lineWidth: 1,
  color: '#333333',
  events: {
    legendItemClick: () => false  // disable legend click
  },
  data: [1, 5, 10, 8, 19, 28, 0 , 12]
};

score:3

This is the way to make legends of Highcharts graph non-clickable because whenever you click on a particular legend than corresponding slice become disappear from graph so make graph persist as per business requirement we may make legends unclickable.

  plotOptions: {
        column: {
            pointPadding: 0,
            borderWidth: 1,
        },
        series: {
            events: {
                legendItemClick: function (e) {
                    e.preventDefault();
                }
            }
        }
    }

score:15

And if you work with pies, you must do :

    pie: {
       showInLegend: true,
       allowPointSelect: false,
       point:{
           events : {
            legendItemClick: function(e){
                e.preventDefault();
            }
           }
       }
   }

Related Query

More Query from same tag