1、错误描述
echarts.js:6064 Method `dispose` should be implemented in custom.
(anonymous) @ echarts.js:6064
echarts.js:25450 Uncaught Error: xAxis "0" not found
at cartesian2d (http://localhost:8888/EChart/js/echarts.js:25450:28)
at createListFromArray (http://localhost:8888/EChart/js/echarts.js:25357:36)
at ExtendedClass.getInitialData (http://localhost:8888/EChart/js/echarts.js:26395:21)
at ExtendedClass.init (http://localhost:8888/EChart/js/echarts.js:17365:30)
at ExtendedClass.<anonymous> (http://localhost:8888/EChart/js/echarts.js:2459:45)
at Array.forEach (native)
at each (http://localhost:8888/EChart/js/echarts.js:3226:18)
at ExtendedClass.visitComponent (http://localhost:8888/EChart/js/echarts.js:2420:18)
at Function.entity.topologicalTravel (http://localhost:8888/EChart/js/echarts.js:16078:31)
at ExtendedClass.mergeOption (http://localhost:8888/EChart/js/echarts.js:2389:29)
2、错误原因
xAxis:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
xAxis直接接收X轴的data值,应该是在大括号里包裹data值3、解决办法
xAxis:{
type: 'category',
data:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]
}