你能否告诉我如何在鼠标悬停事件的高图中增加圆环图中的尺寸切片?
我试试这个
point.update({
// color: (that !== point) ? 'grey' : point.options.origColor
color: (that !== point) ? Highcharts.Color(point.color).setOpacity(0.3).get() : point.options.origColor,
size:'20%'
}, false, false);
但这里不起作用是我的代码
mouseOver: function (e) {
console.log(this)
var that = this;
console.log(e);
if(this.series.chart.series[0].data.indexOf(this)!=-1){
return
}
this.series.chart.series[1].points.forEach(function (point) {
point.update({
// color: (that !== point) ? 'grey' : point.options.origColor
color: (that !== point) ? Highcharts.Color(point.color).setOpacity(0.3).get() : point.options.origColor,
size:'20%'
}, false, false);
});
this.series.chart.redraw();
that.series.dataLabelsGroup.hide();
that.connector.show();
that.dataLabel.show();
},
https://jsfiddle.net/ty1jg0mx/
请检查此链接 http://c3js.org/samples/chart_donut.html 当你悬停时,切片大小会增加。我们可以这样做 任何更新