Highcharts provides a way to increase the line width of a series when hovering over the series or its associated legend item
Highcharts.chart('container', {
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
plotOptions: {
series: {
states: {
hover: {
enabled: true,
lineWidth: 5
}
}
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]});
Highcharts also provides a way to give the legend item a colour when the legend item is hovered on
Highcharts.chart('container', {
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',
'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
legend: {
itemHoverStyle: {
color: 'red',
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5,
216.4, 194.1, 95.6, 54.4]
}]});
Is there a way to combine the two and give the associated chart series the same colour as the legend item's highlight colour, when the legend item is hovered on? So it would be like this jsfiddle http://jsfiddle.net/56wL9oxs/ except the chart series line would also highlight in red when the legend item is hovered. Currently using Angular 6+ so looking for a non-jquery way of doing it. Thanks!