gpt4 book ai didi

javascript - 鼠标悬停时突出显示整个系列

转载 作者:行者123 更新时间:2023-11-28 20:40:41 25 4
gpt4 key购买 nike

当我将鼠标悬停在某个点上时,该点会突出显示。是否可以突出整个系列而不是单个点?jfiddle 中的示例:

$(function () {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
series: [{
type: 'line',
data: [[0, 1.11], [1, 4.51], [2, 4]],
},{
type: 'line',
data: [[0, 2.11], [1, 3.51], [2, 2]],
}]
});
});

});

最佳答案

您可以按照 api 中的说明更改系列的线宽:

http://api.highcharts.com/highcharts#plotOptions.series.states.hover.lineWidth

plotOptions: {
series: {
states: {
hover: {
enabled: true,
lineWidth: 5
}
}
}
},

关于javascript - 鼠标悬停时突出显示整个系列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14455951/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com