如何在鼠标悬停时在饼图上调用鼠标单击事件?我尝试了一些东西,但它的点击并不像我需要的那么顺利。这是代码示例:
plotOptions: {
pie: {
innerSize: '50%',
size: 100,
cursor: 'pointer',
dataLabels: false
},
series: {
allowPointSelect: true,
type: 'pie',
name: 'Coordinates',
point: {
events: {
mouseOver: function (e) {
pieChart.tooltip.hide();
var serie = this.series.data[this.x];
var waitBeforeSelect = setTimeout(function () {
clearTimeout(waitBeforeSelect);
serie.select();
serie.series.show();
pieChart.tooltip.refresh(serie);
}, 500);
var serieName = serie.name;
var textToShow = serieName.substr(0, serieName.indexOf(';'));
$('#pieChartInfoText').children().text(textToShow);
$('#pieChartInfoText').children().css('color', serie.color);
},
mouseOut: function () {
pieChart.tooltip.hide();
}
}
}
}
},