chart.setTitle( { text: 'Head Count Terminations' }, { text: 'Sales' } );
chart.options.title.text = 'Head Count Terminations';
chart.options.subtitle.text = 'Sales';
您可以通过覆盖导出按钮和导出选项来避免这个问题。
功能:
function exportActualChart() {
this.exportChart({}, {
title: {
text: this.title.text
},
subtitle: {
text: this.subtitle.text
}
});
}
图表选项
exporting: {
buttons: {
exportButton: {
menuItems: [{
text: 'Standard export',
onclick: function () {
this.exportChart();
}
}, {
text: 'With new title',
onclick: exportActualChart
},
null,
null]
}
}
}