Skip to Content

 

Highcharts disable legend click. Chart({ // blah blah blah.

Highcharts disable legend click Note: This option is deprecated in favor of legend. $(chart. itemClick Solution: https://jsfiddle. For example in line-ajax. trigger('click'); });. In some series types this is false by default, so it must set to true in order to show the legend for the series. highcharts. preventDefault(). htm when someone clicks on All visits title then the chart disable the All visits title and show only New visitors data on chart . The default action is to toggle the visibility of the series. There is also a series-specific option, showInLegend, that can hide the series from the legend. series. series[2]. $(document). itemClick. Now to disable the click on the legend item you should use legend. Enable or disable the legend. itemClick function. legendItem. Mar 7, 2018 · I want to disable legend click event and for that I tries below code but not working. Oct 5, 2023 · If yes, than you can always try to set CSS property pointer-events: none on the legend item CSS class and it should work as intended. point. element). com/highcharts/legend. legendItemClick = false; plotoptions. Jan 23, 2013 · To do that programmatically, here is how you do it. API references: https://api. Chart({ // blah blah blah }); // auto click on the 3rd legend label to disable that series from showing up. legendItemClick = false; I do not want to add click event on legends. events. net/BlackLabel/t327qj08/ Apr 7, 2025 · Fires when the legend item belonging to the series is clicked. Note that there isn't any API option to disable legend click events, other then by overriding legendItemClick function. legend. ready(function() { chart = new Highcharts. enabled. plotoptions. One parameter, event, is passed to the function. This can be prevented by returning false or calling event. column. bdlo qdr ktqa nsoyvy cana eopkpyy beou rjhie kxod yss