![](/img/trans.png)
[英]Highstock navigator does not work when also importing “highcharts-more” file
[英]Vue encountering problem when importing highcharts-more
我正在尝试在Highcharts中创建一个BoxPlot。 似乎需要一个名为highcharts-more的模块。 我无法导入。
我是这样导入的:
import { Chart } from 'highcharts-vue';
import more from 'highcharts/highcharts-more';
more(Chart);
但是,在浏览器控制台中出现以下错误:
Uncaught TypeError: Cannot read property 'parts/Globals.js' of undefined
at eval (highcharts-more.js?33c6:8)
at eval (BoxPlot.vue?7d00:19)
at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/BoxPlot.vue?vue&type=script&lang=js& (app.js:933)
at __webpack_require__ (app.js:770)
at fn (app.js:130)
at eval (BoxPlot.vue?8bce:1)
at Module../src/components/BoxPlot.vue?vue&type=script&lang=js& (app.js:2420)
at __webpack_require__ (app.js:770)
at fn (app.js:130)
at eval (BoxPlot.vue?67a8:1)
我究竟做错了什么?
编辑我使用的是highcharts版本7.1.3和highcharts-vue 1.3.5。
您需要使用Highcharts初始化highcharts-more
模块:
import { Chart } from 'highcharts-vue';
import Highcharts from 'highcharts';
import more from 'highcharts/highcharts-more';
more(Highcharts);
文件: https : //github.com/highcharts/highcharts-vue#importing-highcharts-modules
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.