Hover style for labels in legend

和自甴很熟 提交于 2020-01-03 17:03:04

问题


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



来源:https://stackoverflow.com/questions/17448290/hover-style-for-labels-in-legend

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!