Highcharts 默认并没有提供图表双击事件接口,这里用很简单的方法实现,代码如下
var clickDetected = false;
$("#container").highcharts({
chart: {
events: {
click: function(e) {
if (clickDetected) {
console.log("Double click");
console.log(e);
} else {
clickDetected = true;
setTimeout(function() {
clickDetected = false;
}, 500);
}
}
}
}
});