I've adopted this solution to change the line color when hovering a series in a HighCharts scatterplot (JSFiddle demo here):
$(function () {
$('#container').highcharts({
chart: {
type: 'scatter',
},
plotOptions: {
scatter: {
lineWidth:1,
marker: {
radius: 1,
symbol:'circle',
fillColor: '#800000',
states: {
hover: {
enabled: true,
radius:0,
radiusPlus:2,
lineColor: '#ff0000',
fillColor: '#ff0000'
}
}
},
events: {
mouseOver: function () {
this.chart.series[this.index].update({
color: 'red'
});
},
mouseOut: function () {
this.chart.series[this.index].update({
color: "#b0b0b0"
});
}
}
}
},
series: [{
name: 'A',
color: "#b0b0b0",
data: [[38,42],[39,39],[35,45],[35,54],{x:36,y:35,marker:{radius:8,symbol:'circle'}}
]
}, {
name: 'B',
color: "#b0b0b0",
data: [[46,56],[47,67],[48,69],[50,55],{x:52,y:57,marker:{radius:8,symbol:'circle'}}
]
}]
});
});
The script works but running the web console I see that every hovering of a series causes a TypeError: g.firePointEvent is not a function error
.
In another one of my scripts the error is TypeError: hoverPoint.firePointEvent is not a function
.
Is this a bug of HighCharts or is it possible to avoid it?