我一直在尝试加载highstock作为require模块。我想知道是否有人设法让这个工作?我可以加载highcharts作为一个require模块,它工作正常,但我的highstock垫片不起作用。我得到的是Highcharts.Stockchart不是构造函数错误。
"highcharts": "../vendor/js/libs/highcharts",
"highstock": "../vendor/js/libs/highstock",
...
shim: {
// Put shims here.
"highcharts": {
"exports": "Highcharts",
"deps": [ "jquery"]
},
"highstock": {
"exports": "StockChart",
"deps": [ "jquery", "highcharts"]
},
谢谢
答案 0 :(得分:0)
我能够解决这个问题。我现在意识到Highcharts.Chart构造函数和Highcharts的所有功能都包含在Highstock中,因此已经定义了Highcharts命名空间。