Uncaught TypeError: Cannot read property 'get' of undefined --echarts.min.js:12
2018-11-17 17:35
1836 查看
本来是做后端的,公司要求改改前端 用的是echarts。就使用了一段时间。看来我离全栈只差9999步了!
问题是这样的:
本来公司做的echarts报表很正常 没什么问题(以前鄙人也做了一部分 ),今天同事去看,发现某些网页的报表无法显示。在努力的三个小时之后,发现了问题所在:
我们有很多报表,有条形统计,扇形图表,折线之类的,统一将模板放在common.js里面,突然有个需求是添加新的报表,布线图,我直接复制扇形图,改配置就行(我是这么考虑的)。结果是因为我拷贝的时候,忘记将原来的
[code]//扇形基本样式 function getOption_pie_default(){ ... }
名称改了。
其实应该是这样的:
[code]//步线图基本样式 function getOption_pie_default5(){ ... }
‘get’没定义,应该是在js调用该布线图模板的时候,找不到唯一的函数,所以报错。
实在是因为粗心大意酿成的悲剧,还好不是上线之后发现的问题,希望能帮助到其他同学。
相关文章推荐
- echarts.js:24938 Uncaught TypeError: Cannot read property '0' of undefined
- echarts-all.js:1 Uncaught TypeError: Cannot read property 'getAttribute' of null
- echarts.min.js:25 Uncaught TypeError: Cannot read property 'features' of undefined 报错解决方法
- echarts.min.js:25 Uncaught TypeError: Cannot read property 'features' of undefined
- jquery.dataTables.min.js:62 Uncaught TypeError: Cannot read property 'style' of undefined原因
- Uncaught TypeError: Cannot read property 'call' of undefined jquery.validate.min.js:28
- js中Uncaught TypeError: Cannot read property 'substr' of undefined问题分析
- Hbuilder MUI运行出现Uncaught TypeError: Cannot read property '0' of undefined at js/mui.min.js:7
- cocos2d-js | 数组容器报错undefined “Uncaught TypeError: Cannot read property 'x' of undefined”
- Uncaught TypeError: Cannot read property 'call' of undefined jquery.validate.min.js:28
- angular.min.js:107 TypeError: Cannot read property 'gc' of undefined
- TS/JS错误:TypeError: Cannot read property 'prototype' of undefined
- Cocos creator中出现Uncaught TypeError: Cannot read property 'node' of undefined
- Uncaught TypeError Cannot read property 'length' of undefined
- [Angular] ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'name' of undefined
- 更新jquery-1.12.4.min.js后抛may throw: Uncaught TypeError: Cannot read property 'mozilla' of undefined
- Uncaught TypeError: Cannot read property 'getItem' of null
- Uncaught TypeError: Cannot read property '_setter' of undefined
- Uncaught TypeError: Cannot read property 'length' of undefined出现的问题
- easyui 异常:Uncaught TypeError: Cannot read property 'tabs' of undefined