在Highcharts导出工具的"Print chart“条目下有一条直线。我想生成一个或两个以上的链接,以便将图像与数据格式分开,以及在添加其他链接之前。
我如何生成这条线?我试过使用DIV,但这似乎不是解决方案(太多的调整和技巧),也不是<hr>。那么最好的选择是什么呢?
谢谢你的任何提示!

发布于 2015-02-02 20:57:49
使用Highcharts API,在定义菜单时,您只需将以下代码作为元素添加到exporting.buttons.contextButton.menuItems数组中:
{ separator: true }下面的代码将直接添加到图表选项中,并显示如何分隔每个单独的项(see it on JSFiddle):
exporting: {
buttons: {
contextButton: {
menuItems: [{
textKey: 'printChart',
onclick: function () {
this.print();
}
}, {
separator: true
}, {
textKey: 'downloadPNG',
onclick: function () {
this.exportChart();
}
}, {
separator: true
}, {
textKey: 'downloadJPEG',
onclick: function () {
this.exportChart({
type: 'image/jpeg'
});
}
}, {
separator: true
}, {
textKey: 'downloadPDF',
onclick: function () {
this.exportChart({
type: 'application/pdf'
});
}
}, {
separator: true
}, {
textKey: 'downloadSVG',
onclick: function () {
this.exportChart({
type: 'image/svg+xml'
});
}
}]
}
}
}https://stackoverflow.com/questions/28276592
复制相似问题