我想使用 highcharts 进行离线导出。 这是我的代码
import {Chart} from 'highcharts-vue'
import Highcharts from 'highcharts'
import offlineExporting from "highcharts/modules/offline-exporting"
offlineExporting(Highcharts)
我尝试同时使用exporting.js和offline-exporting.js并且它有效。 这是问题的解决方案吗?如果不行的话还有其他解决办法吗?
最佳答案
要使用offline-exporting
模块,您还需要导入exporting
模块。
此外,您可以禁用 fallbackToExportServer
属性,以便导出永远不会使用 Highcharts 导出服务器。
exporting: {
...,
fallbackToExportServer: false
},
API:
fallbackToExportServer: boolean
Whether or not to fall back to the export server if the offline-exporting module is unable to export the chart on the client side.
...
现场演示: https://jsfiddle.net/BlackLabel/92dbwLgx/
API引用: https://api.highcharts.com/highcharts/exporting.fallbackToExportServer
文档: https://www.highcharts.com/docs/export-module/client-side-export
关于javascript - 尝试离线导出到 Highcharts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55878131/