停止HighCharts增加悬停线的宽度 [英] Stop HighCharts increasing width of line on hover
问题描述
我正在使用最新版本的HighCharts来构建具有多种趋势的图表。默认情况下,当用户的鼠标悬停在线上时,HighCharts会增加线条的粗细/线宽。因为我可以在图表上有~10个趋势,我想删除此功能,这意味着线条的粗细在悬停时不会改变。
case make lineWidth:1 for hover
plotOptions:{
series:{
lineWidth:2,
表示:{
悬停:{
lineWidth:1
}
}
I am using the latest version of HighCharts to build a chart with multiple trends. By default HighCharts increases the thickness / lineWidth of a line when the user's mouse hovers over it. Because I could have ~10 trends on the chart I would like to remove this feature, meaning that the thickness of the line does not change on hover.
I believe I need to set this in the plotOptions{} section. I have tried adding the following without success:
plotOptions: {
series: {
mouseOver: {
lineWidth: 2
}
},
marker: {
enabled: false,
states: {
hover: {
lineWidth: 2
}
}
}
},
I would, however, like to retain the marker that denotes where the mouse of positioned:
Make this below change (Set the states
mouseover to disabled state)
plotOptions: {
series: {
lineWidth: 2,
states: {
hover: {
enabled: false
}
}
},
In that case make lineWidth: 1 for hover
plotOptions: {
series: {
lineWidth: 2,
states: {
hover: {
lineWidth: 1
}
}
这篇关于停止HighCharts增加悬停线的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!