图例中的标签悬停样式 [英] Hover style for labels in legend
本文介绍了图例中的标签悬停样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
游标:默认
如何设置图例中的标签悬停样式?在本例的东京,纽约,柏林,伦敦标签上徘徊 http:/ / /www.highcharts.com/demo/ ,并且还可以防止将颜色更改为黑色或为悬停标签设置另一种颜色? 我禁用了点击图例通过添加此属性来标签:
plotOptions.series.events.legendItemClick = function(){
return false;
}
但现在看起来很奇怪,光标是指针,标签颜色在悬停时变化。
解决方案
您可以在itemHoverStyle中定义它
http://api.highcharts.com/highcharts#legend.itemHoverStyle
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.
解决方案
You can define it in itemHoverStyle
http://api.highcharts.com/highcharts#legend.itemHoverStyle
这篇关于图例中的标签悬停样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文