Open lvyulong opened 7 years ago
ReferenceError: echarts is not defined,i also found
I have the same trubble : ReferenceError: echarts is not defined
@lvyulong @LaureMonlouis did you included echarts and angular lib as docs/index.html
? I that was done properly, this error should not exists.
If the error still exists, please provided your detailed code
如果是只安装了angular-echarts,还需要再安装下echarts,这样就不会报错了。
For anyone else who hates themselves and still uses AngularJS in 2018, the way to fix this is to make sure the window object has access to echarts.
So simply do:
window.echarts = require 'echarts/dist/echarts.js'
Similar problem was happened, and fixed it by changing the loaded file from echarts.js to ceharts-all.js.
I have the same trubble : ReferenceError: echarts is not defined
It comes from /dist/angular-echarts.js
var options;
getSizes(scope.config);
if (!chart) {
chart = echarts.init(ndWrapper, theme.get(scope.config.theme || 'macarons'));
}