在highcharts中生成导出时显示微调器

在highcharts中生成导出时显示微调器,highcharts,Highcharts,我希望能够在生成导出图像时显示微调器。 有没有办法实现这一点,或者当文件生成并开始下载时,我可以订阅一个触发的事件 我现在的代码是 exporting: { allowHTML: true, buttons: { contextButton: { menuItems: null, onclick: function () { this.exportChart({ sourceWidth: 1500, sourceHeight: this.chartHeig

我希望能够在生成导出图像时显示微调器。 有没有办法实现这一点,或者当文件生成并开始下载时,我可以订阅一个触发的事件

我现在的代码是

exporting: {
  allowHTML: true,
  buttons: {
  contextButton: {
    menuItems: null,
    onclick: function () {
      this.exportChart({ sourceWidth: 1500, sourceHeight: this.chartHeight }, null);
    },
    symbol: 'url(assets/images/icon_download.png)'
  }
}

查看此现场演示:

前80行代码改变了Highcharts核心。此修改实现导出前<代码>和导出后<代码>事件,可用于管理微调器图标(创建和销毁它):

API参考:

  chart: {
    events: {
      beforeExporting: function() {
        this.spinner = this.renderer.image('http://thinkfuture.com/wp-content/uploads/2013/10/loading_spinner.gif', this.chartWidth / 2 - 50, this.chartHeight / 2 - 50, 100, 100).add();
      },
      afterExporting: function() {
        this.spinner.destroy();
      }
    }
  }