vue2.0使用 echarts-gl 报错
报错信息:
This dependency was not found:
- echarts/lib/label/labelStyle in ./node_modules/echarts-gl/lib/component/common/LabelsBuilder.js, ./node_modules/echarts-gl/lib/component/grid3D/Grid3DAxis.js and 1 other
To install it, you can run: npm install --save echarts/lib/label/labelStyle
This dependency was not found:
* echarts/lib/label/labelStyle in ./node_modules/echarts-gl/lib/component/common/LabelsBuilder.js, ./node_modules/echarts-gl/lib/component/grid3D/Grid3DAxis.js and 1 other
To install it, you can run: npm install --save echarts/lib/label/labelStyle
复制代码
不能直接 npm i echarts-gl 请安装降级版本
npm install echarts-gl@1.1.0 --save
axis.getLabelsCoords is not a function 实测解决
继上一个一个文章发现项目成功运行了之后,但是将echarts实例拿过来后,又遇到了报错getLabelsCoords is not a function。 发现gitthb上echarts得开发人员说gl版本要更新到1.1.1 然后就不报错了! 实测可用
npm install echarts-gl@1.1.1 --save
复制代码