javascript - 尝试离线导出到 Highcharts

标签 javascript vue.js highcharts export offline-mode

我想使用 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/

相关文章:

javascript - Highcharts:在没有切片动画的情况下更改饼图部分的颜色

javascript - 使用 HTML 类作为 Highcharts 表格数据源

javascript - 在 highcharts 中突出显示一系列中的一个栏?

javascript - 如何从 JavaScript 中的逗号分隔字符串中获取每个值?

vue.js - Vue Slider 组件 - 启用拖动结束和点击同时更新

laravel - 如何使用 VueJS 和 Vue-router 在 Laravel 应用程序中使用 url 参数获取数据

javascript - 如何动态更改vuejs中v-list上显示的数据?

javascript - 获取服务器端时间和客户端时间之间的差异并显示它

javascript - 如何在 Google Apps 脚本中修改 HTMLOutput 之前的 html 文件

javascript - 如何正确键入将对象数组转换为对象对象的函数