Closed ciukstar closed 6 years ago
did you try in your main.ts
import * as echarts from 'echarts';
(<any>window).echarts = echarts;
import 'echarts-gl/dist/echarts-gl.min.js';
instead of configuring this in angular.json
?
Yes, adding
import * as echarts from 'echarts';
(<any>window).echarts = echarts;
import 'echarts-gl/dist/echarts-gl.min.js';
to main.ts
and removing
"node_modules/echarts/dist/echarts.min.js", "node_modules/echarts-gl/dist/echarts-gl.min.js"
from {..., "scripts": [...]}
in angular.json
resolves the issue. Thank you!
After update from
ngx-echarts@3.2.0
tongx-echarts@4.0.0-beta.0
my chart{ "xAxis3D": {...}, "yAxis3D": {...}, "zAxis3D": {...}, "grid3D": {...}, "series": { "type": "bar3D", ... } }
that relies onecharts-gl@1.1.1
throws exception: "ERROR Error: Component series.bar3D not exists. Load it first.
". It does work (no errors thrown) underngx-echarts@3.2.0
withtsconfig.json
:{..., "compilerOptions": {..., "paths": { "zrender": ["./node_modules/zrender/dist/zrender.min.js"], "echarts": ["./node_modules/echarts/dist/echarts.min.js"] },...}}
andangular.json
:{..., ... {..., "scripts": [..., "node_modules/echarts/dist/echarts.min.js", "node_modules/echarts-gl/dist/echarts-gl.min.js",...]}, ...}
.Please, provide some guidance on how to configure
ngx-echarts@4.0.0-beta.0
withecharts-gl@1.1.1
.