Eacharts K线报错问题

1、Cannot read property 'coord' of undefined 

原因:初始化的时候还未获取到数据

2、

在vue中引用了Echarts 导致Cannot read property getAttribute of null?

原因:未获取到图形容器,VUE需要先把容器渲染出来才能挂载上echarts图形。

解决办法:将初始化K线的方法在this.$nextTick(function(){初始化K线的方法})里面调用

猜你喜欢

转载自www.cnblogs.com/susu-yee/p/10551672.html