如何使用与Highcharts默认的打印选项自定义下载按钮? [英] How to use a custom download button with default printing options in Highcharts?
问题描述
我想使用自定义打印按钮,我Highcharts图。现在,我成功地加入它,但是,我不知道如何使它显示这些默认的打印选项(导出为PNG,SVG,JPG,PDF)。以及如何使该消失的默认打印按钮。
I'd like to use a custom printing button for my Highcharts graph. Now, I succeeded in adding it, however, I don't know how to make it display those default printing options (Export as PNG, SVG, JPG, PDF). And how to make disappear that default printing button.
这是code:
exporting: {
buttons: {
'myButton': {
_id: 'myButton',
symbol: 'url(http://geodev.grid.unep.ch/images/button_download.png)',
onclick: function () {
alert('click!')
}
}
}
}
在这里是小提琴。
有没有在的onClick事件它说的,任何简单的方法:显示所有打印选项?
Is there any simple approach for that in the "onClick" event it says: "Display all print options"?
感谢您的任何建议!
推荐答案
由于塞巴斯蒂安显示在他的例子(我删除一些不必要的命令),没有必要推倒重来,但只是为了替代默认的图像就足够了:
As Sebastian showed in his example (I deleted a few unnecessary commands), no need to reinvent the wheel, but just to replace the default image is sufficient:
exporting: {
buttons: {
contextButton: {
symbol: 'url(http://geodev.grid.unep.ch/images/button_download.png)'
}
}
}
这篇关于如何使用与Highcharts默认的打印选项自定义下载按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!