You can wrap exportChart
method and set showInLegend
property to false
on invisible series:
var H = Highcharts;
H.wrap(H.Chart.prototype, 'exportChart', function(proceed, exportingOptions) {
var series = this.series;
Highcharts.each(series, function(s) {
if (s.visible) {
s.update({
showInLegend: true
}, false);
} else {
s.update({
showInLegend: false
}, false);
}
});
// which are sliced off this function's arguments
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
Highcharts.each(series, function(s) {
s.update({
showInLegend: true
}, false);
});
this.redraw();
});
Live demo: http://jsfiddle.net/BlackLabel/cgj9vwas/
Try this:
series: [{
showInLegend: false,
name: 'Series',
data: value
}]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.