In HighChart legend, by default, if you click on the legend item, the related chart will show/hide the part this legend represents. In order to disable this function:
For pie chart:
plotOptions: {
column: {
events: {
legendItemClick: function () {
return false; // <== returning false will cancel the default action
}
}
}
}
For bar chart:
plotOptions: {
series: {
point: {
events: {
legendItemClick: function () {
return false; // <== returning false will cancel the default action
}
}
}
}
}
For pie chart:
plotOptions: {
column: {
events: {
legendItemClick: function () {
return false; // <== returning false will cancel the default action
}
}
}
}
For bar chart:
plotOptions: {
series: {
point: {
events: {
legendItemClick: function () {
return false; // <== returning false will cancel the default action
}
}
}
}
}
Comments