从Angular 2+的Highcharts库中加载可变图

时间:2018-07-02 12:05:59

标签: javascript angular highcharts

我正在尝试以角度2+绘制variwide chart

到目前为止,我正在使用

绘制图表

const Highcharts = require('highcharts/highstock.src');

如何以这种方式导入highcharts的可变模块?

我尝试这样做。

const Variwide = require('highcharts/modules/variwide')

它仍然给出Highcharts 17 error

1 个答案:

答案 0 :(得分:1)

摘自官方文档:https://www.highcharts.com/docs/getting-started/install-from-npm

var Highcharts = require('highcharts/highstock');

// Load **** as a module
require('highcharts/modules/variwide')(Highcharts);