You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* Highcharts plugin for setting a lower opacity for other series than the one that is hovered
* in the legend
*/
(function (Highcharts) {
var each = Highcharts.each;
Highcharts.wrap(Highcharts.Legend.prototype, 'renderItem', function (proceed, item) {
proceed.call(this, item);
var series = this.chart.series,
element = item.legendGroup.element;
type = this.chart.userOptions.chart.type;
if(type == 'pie'){ //pie default
return;
}
element.onmouseover = function () {
each(series, function (seriesItem) {
if (seriesItem !== item) {
each(['group', 'markerGroup'], function (group) {
seriesItem[group].attr('opacity', 0.25);
});
}
});
}
element.onmouseout = function () {
each(series, function (seriesItem) {
if (seriesItem !== item) {
each(['group', 'markerGroup'], function (group) {
seriesItem[group].attr('opacity', 1);
});
}
});
}
});
}(Highcharts));
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: