问题描述
我想通过高图表进行脱机导出.这是我的代码
I want to make offline exporting with highcharts.Here is my code
import {Chart} from 'highcharts-vue'
import Highcharts from 'highcharts'
import offlineExporting from "highcharts/modules/offline-exporting"
offlineExporting(Highcharts)
我试图同时使用exporting.js和offline-exporting.js,并且有效.这是问题的解决方案吗?如果不是,还有其他解决方法吗?
I tried to use exporting.js and offline-exporting.js together and it worked.Is this solution of the problem? If it'not, is there any another solution?
推荐答案
要使用离线导出
模块,您还需要导入 exporting
模块.
To use the offline-exporting
module you need to also import exporting
module.
此外,您可以禁用 fallbackToExportServer
属性,以便导出将永远不会使用Highcharts导出服务器.
Additionally, you can disable the fallbackToExportServer
property so that the export will never use Highcharts export server.
exporting: {
...,
fallbackToExportServer: false
},
API:
如果脱机导出模块无法在客户端上导出图表,则是否退回到导出服务器.
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
这篇关于尝试离线导出到Highcharts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!