Hover style for labels in legend

2019-06-27 12:25发布

问题:

How to set hover style for labels in legend?

If it is possible to set cursor: default on hovering on "Tokyo", "New York", "Berlin", "London" labels in this example http://www.highcharts.com/demo/ and also prevent changing colors to black or set another color for hovered label?

I've disabled clicking on legend labels by adding this property:

plotOptions.series.events.legendItemClick = function() {
    return false;
}

But now it looks strange that cursor is pointer and labels colors are changing on hover.

回答1:

You can define it in itemHoverStyle

http://api.highcharts.com/highcharts#legend.itemHoverStyle



标签: highcharts