错误提示:
Uncaught TypeError: Cannot read property ‘coordinateSystem’ of undefined
at Object.layout (cartesianAxisHelper.js:54)
at ExtendedClass.render (CartesianAxisView.js:74)
at echarts.js:1427
at Array.forEach ()
at each (util.js:300)
at renderComponents (echarts.js:1425)
at render (echarts.js:1411)
at ECharts.update (echarts.js:838)
at ECharts…/node_modules/echarts/lib/echarts.js.echartsProto.setOption (echarts.js:411)
at VueComponent.optionsHandler (index.js:1248)
原因:
某些图表不支持extent中的某些属性,而你却在extent中给了。
比如"xAxis.0.axisLabel.rotate"使维度文字倾斜的属性,像地图、水滴图、饼图等是没有这个属性的,所以报错。
解决方法:
判断图表类型来给extent中的属性