图表初始化后如何更改 highcharts 事件?
<div id='report'></div>
var chart = $('#container').highcharts({
chart: {
},
xAxis: {
},
plotOptions: {
series: {
point: {
events: {
mouseOver: function() {
$reporting.html('inner x: '+ this.x +', y: '+ this.y);
}
}
},
events: {
mouseOut: function() {
$reporting.empty();
}
}
}
},
tooltip: {
enabled: false
},
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]
}]
});
chart.options.plotOptions.series.point.events.mouseOver = function() {
$('#report').html('outer x: ' + this.x + ', y: ' + this.y);
}
我想像上面那样覆盖 mouseOver 事件,但似乎没有影响。我会非常感谢任何人可以提供帮助。