Highchart,如何与子主题一起导出 Highcgarts Drilldown
Highchart, How to export along with sub-topics Highcgarts Drilldown
我在导出 PDF 或 PNG 文件时遇到问题。它不显示子主题。单击此 link 演示 Link Demo
and this when I export Picture when export
But I want to export like this Picture export I want
时,我想显示子主题
您可以根据生成的面包屑更新导出的字幕文本。
例如:
chart: {
...,
events: {
redraw() {
const breadcrumbs = this.breadcrumbs;
breadcrumbsText = '';
if (breadcrumbs) {
breadcrumbs.list.forEach(list => {
if (breadcrumbsText) {
breadcrumbsText += ' / '
}
breadcrumbsText += list.levelOptions.name;
});
}
},
load() {
if (this.renderer.forExport) {
this.setSubtitle({
text: breadcrumbsText
});
Highcharts.drawTable(this);
}
}
},
}
现场演示: http://jsfiddle.net/BlackLabel/ety8oak4/
API参考:https://api.highcharts.com/class-reference/Highcharts.Chart#setSubtitle
我在导出 PDF 或 PNG 文件时遇到问题。它不显示子主题。单击此 link 演示 Link Demo
and this when I export Picture when export
But I want to export like this Picture export I want
您可以根据生成的面包屑更新导出的字幕文本。 例如:
chart: {
...,
events: {
redraw() {
const breadcrumbs = this.breadcrumbs;
breadcrumbsText = '';
if (breadcrumbs) {
breadcrumbs.list.forEach(list => {
if (breadcrumbsText) {
breadcrumbsText += ' / '
}
breadcrumbsText += list.levelOptions.name;
});
}
},
load() {
if (this.renderer.forExport) {
this.setSubtitle({
text: breadcrumbsText
});
Highcharts.drawTable(this);
}
}
},
}
现场演示: http://jsfiddle.net/BlackLabel/ety8oak4/
API参考:https://api.highcharts.com/class-reference/Highcharts.Chart#setSubtitle