使用ecahrts的官方实例的echarts.js:11954 Uncaught Error: series.type should be specified. at Function.entity.getClass (echarts.js:11954)

由于使用echats的图表,而直接把官方实例c过来的时候,图表加载不出来。

浏览器按f12显示这样的错

echarts.js:11954 Uncaught Error: series.type should be specified.
    at Function.entity.getClass (echarts.js:11954)
    at ExtendedClass.<anonymous> (echarts.js:20753)
    at Array.forEach (<anonymous>)
    at each$1 (echarts.js:528)
    at ExtendedClass.visitComponent (echarts.js:20736)
    at Function.entity.topologicalTravel (echarts.js:17832)
    at ExtendedClass.mergeOption (echarts.js:20706)
    at ExtendedClass.initBase (echarts.js:21237)
    at ExtendedClass.resetOption (echarts.js:20648)
    at ExtendedClass.setOption (echarts.js:20630)

 发生错误的位置:

根据提示,是这的错误,需要自己加载option

所以加上一句话,也就是这样:解决办法

 

posted @ 2018-12-01 17:07  喜欢沧月的二福君  阅读(3389)  评论(0编辑  收藏  举报

联系博主qq2456891380