Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 移动到导入后出现Highcarts错误_Javascript_Meteor_Highcharts_Node Modules_Javascript Import - Fatal编程技术网

Javascript 移动到导入后出现Highcarts错误

Javascript 移动到导入后出现Highcarts错误,javascript,meteor,highcharts,node-modules,javascript-import,Javascript,Meteor,Highcharts,Node Modules,Javascript Import,我已经让Highcharts使用Blaze模板很长一段时间了。我正转向进口,现在我遇到了麻烦 图表文件模块: /app name/imports/ui/pages/helpers/charts.js //注意:在我使用Highcarts meteor软件包之前,我添加了这些导入: import 'highcharts-more'; import 'highcharts-solid-gauge'; import Highcharts from 'highcharts'; import { Temp

我已经让Highcharts使用Blaze模板很长一段时间了。我正转向进口,现在我遇到了麻烦

图表文件模块: /app name/imports/ui/pages/helpers/charts.js

//注意:在我使用Highcarts meteor软件包之前,我添加了这些导入:

import 'highcharts-more';
import 'highcharts-solid-gauge';
import Highcharts from 'highcharts';
import { Template } from 'meteor/templating';


let testGuage = percentage => {
    $('#test-container-gauge').highcharts({
        chart: {
            type: 'solidgauge'
        },
        title: null,
        pane: {
            center: ['50%', '85%'],
            size: '125%',
            startAngle: -90,
            endAngle: 90,
            background: {
                backgroundColor: '#EEE',
                innerRadius: '60%',
                outerRadius: '100%',
                shape: 'arc'
            }
        },
        tooltip: {
            enabled: false
        },
        yAxis: {
            min: 0,
            max: 100,
            title: {
                text: 'Speed'
            },
            stops: [
                [0.1, '#3b74bf'],
                [0.5, '#0ddfd3'],
                [0.9, '#53df82']
            ],
            lineWidth: 0,
            minorTickInterval: null,
            tickPixelInterval: 400,
            tickWidth: 0,
            title: {
                y: -70
            },
            labels: {
                y: 16
            }
        },
        plotOptions: {
            solidgauge: {
                dataLabels: {
                    y: 5,
                    borderWidth: 0,
                    useHTML: true
                }
            }
        },
        credits: {
            enabled: false
        },
        series: [{
            name: 'Speed',
            data: percentage,
            dataLabels: {
                format: '<div style="text-align:center"><span style="font-size:25px;color:#7e7e7e">{y}%</span><br/>' +
                    '<span style="font-size:12px;color:silver">Test</span></div>'
            }
        }]
    });
}
我输入的高图表依赖项:

"highcharts": "^5.0.12",
"highcharts-more": "^0.1.2",
"highcharts-solid-gauge": "^0.1.2",
Highcharts meteor软件包在切换到导入(我删除了这些软件包)之前,我使用并使用过:

马扎利克:海图,马扎利克:海图

错误是:


在Highcharts github tracker上阅读此票据。模块必须初始化-因此在导入(例如highcharts more)之后,您需要像这样初始化模块highcharts更多(highcharts)在highcharts github tracker上读取此票据。模块必须初始化-因此导入后,例如highcharts more,您需要像highcharts(highcharts)这样初始化该模块
"highcharts": "^5.0.12",
"highcharts-more": "^0.1.2",
"highcharts-solid-gauge": "^0.1.2",