当前位置:   article > 正文

【已解决】微信小程序Echarts图表库组件报错component is not found in path...找不到路径_teechart tecanvas not found

teechart tecanvas not found

按照Echarts图表库官方文档使用

https://github.com/ecomfe/echarts-for-weixin


问题描述

项目中需要使用图表库
将下载下来的demo里面的ec-canvas组件复制到自己的项目里
在这里插入图片描述

开始使用

我的小程序项目使用wepy开发的,第一次使用Echarts图表库
明明按照官方文档里操作,运行后报错找不到路径???
component is not found in path
然后我就反复整了几小时还行不行。。。。气的彻底疯了!!!
在这里插入图片描述


在这里插入图片描述

原因分析:

因为引入的:
usingComponents: { "ec-canvas": "./../../components/ec-canvas/echarts" }
echarts不是json配置文件!!!


解决办法:

ec-canvas.json里面开启了组件!!
改为使用ec-canvas
usingComponents: { "ec-canvas": "./../../components/ec-canvas/ec-canvas" }


看图说话

在这里插入图片描述

成功解决!!!!!!!!!!!!!!!

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/124011
推荐阅读