在Highcharts中以pdf格式下载更改数据
我有一个海图,希望能够下载为pdf格式。但是在下载之前,highchart中应该添加一个标题作为html。这可能吗?类似事件:打印前和打印后,但仅用于下载您可以为“下载PDF文档”按钮定义自定义单击事件:在Highcharts中以pdf格式下载更改数据,highcharts,Highcharts,我有一个海图,希望能够下载为pdf格式。但是在下载之前,highchart中应该添加一个标题作为html。这可能吗?类似事件:打印前和打印后,但仅用于下载您可以为“下载PDF文档”按钮定义自定义单击事件: exporting: { menuItemDefinitions: { // Custom definition downloadPDF: { onclick: function() { this.
exporting: {
menuItemDefinitions: {
// Custom definition
downloadPDF: {
onclick: function() {
this.update({
title: {
text: 'New title'
}
}, false);
this.exportChart({
type: 'application/pdf'
});
this.update({
title: {
text: 'Old title'
}
}, false);
},
text: 'Download PDF document'
}
}
}
现场演示: API参考:
您可以为“下载PDF文档”按钮定义自定义单击事件:
exporting: {
menuItemDefinitions: {
// Custom definition
downloadPDF: {
onclick: function() {
this.update({
title: {
text: 'New title'
}
}, false);
this.exportChart({
type: 'application/pdf'
});
this.update({
title: {
text: 'Old title'
}
}, false);
},
text: 'Download PDF document'
}
}
}
现场演示: API参考: