question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: Cannot read property '__animators' of undefined

See original GitHub issue

这个动画错误,现象: 作图成功,但很快闪断,只剩部分图例,其余是空白

Error: e is undefined
V.prototype.stopAnimation@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:3:1
V/h.delFromMap@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:1:30324
o.prototype.delRoot@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:8:20547
o.prototype.delRoot@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:8:20438
V.prototype.delElement@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:1:30952
V.prototype.delShape@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:1:30579
t.prototype.clear@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:12:10633
t.prototype.dispose@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:12:10747
i.prototype._disposeChartList@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:1:11912
i.prototype.clear@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:1:20974
i.prototype.dispose@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:1:21279
s.init@http://localhost:8080/assets/bower_components/echarts/build/dist/echarts-all.js:1:2629
ChartsEcharts</draw_hotel_order_fail_echart@http://localhost:8080/assets/admin/pages/scripts/charts-echarts.js:6:23
ChartsEcharts</<.initCharts@http://localhost:8080/assets/admin/pages/scripts/charts-echarts.js:23:13
EffectiveOrder</draw_hotel_daily_datatable/<@http://localhost:8080/assets/admin/pages/scripts/effective-order.js:50:13
processQueue@http://localhost:8080/assets/bower_components/angular/angular.js:14745:28
scheduleProcessQueue/<@http://localhost:8080/assets/bower_components/angular/angular.js:14761:27
$RootScopeProvider/this.$get</Scope.prototype.$eval@http://localhost:8080/assets/bower_components/angular/angular.js:15989:16
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:8080/assets/bower_components/angular/angular.js:15800:15
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:8080/assets/bower_components/angular/angular.js:16097:13
done@http://localhost:8080/assets/bower_components/angular/angular.js:10546:36
completeRequest@http://localhost:8080/assets/bower_components/angular/angular.js:10744:7
requestLoaded@http://localhost:8080/assets/bower_components/angular/angular.js:10685:1
TypeError: Cannot read property '__animators' of undefined
    at V.stopAnimation (echarts-all.js:3)
    at h.delFromMap (echarts-all.js:1)
    at o.delRoot (echarts-all.js:8)
    at o.delRoot (echarts-all.js:8)
    at V.delElement (echarts-all.js:1)
    at V.delShape (echarts-all.js:1)
    at Object.t.clear (echarts-all.js:12)
    at Object.t.dispose (echarts-all.js:12)
    at Object.i._disposeChartList (echarts-all.js:1)
    at Object.i.clear (echarts-all.js:1)(anonymous function) @ angular.js:12477ident.$get @ angular.js:9246processQueue @ angular.js:14753(anonymous function) @ angular.js:14761parent.$get.Scope.$eval @ angular.js:15989parent.$get.Scope.$digest @ angular.js:15800parent.$get.Scope.$apply @ angular.js:16097done @ angular.js:10546completeRequest @ angular.js:10744requestLoaded @ angular.js:10685

附上作图的option

option={"calculable": true,"toolbox": {"feature": {"magicType": {"show": true,"title": {"line": "折线图切换","stack": "堆积","bar": "柱形图切换","tiled": "平铺"},"type": ["bar","line","stack"]},"restore": {"show": true,"title": "还原"},"saveAsImage": {"show": true,"title": "保存为图片","type": "png","lang": ["点击保存"]},"dataView": {"show": true,"title": "数据视图","readOnly": false,"lang": ["数据视图","关闭","刷新"]}},"show": true,"y": 0},"tooltip": {"trigger": "axis"},"legend": {"data": ["正常成单","原因不明","新单欺诈","新单客人取消","已审满房","已审特殊满房","已审变价","已审客人取消","已审其他原因","已确认酒店取消","已确认酒店取消","已确认酒店取消","已确认客人取消","已确认其他原因","审核担保订单取消","审核删除(入住日以后删除的订单)","NOSHOW"],"y": "5%"},"grid": {"x2": "5%","y2": "10%","x": "5%","y": "60%"},"xAxis": [{"boundaryGap": false,"type": "category","data": ["2015-09-29","2015-09-30","2015-10-01","2015-10-02","2015-10-03","2015-10-04","2015-10-05","2015-10-06","2015-10-07","2015-10-08"]}],"yAxis": [{"type": "value"}],"series": [{"name": "正常成单","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["34531","15002","2700","-","-","-","-","205507","217867","-"]},{"name": "原因不明","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["0","0","0","-","-","-","-","0","0","-"]},{"name": "新单欺诈","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["2755","3081","3794","-","-","-","-","0","0","-"]},{"name": "新单客人取消","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["541","705","783","-","-","-","-","16248","12099","-"]},{"name": "已审满房","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["52337","65554","78503","-","-","-","-","39443","37874","-"]},{"name": "已审特殊满房","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["108340","112808","131897","-","-","-","-","12322","10964","-"]},{"name": "已审变价","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["18628","21837","23371","-","-","-","-","0","0","-"]},{"name": "已审客人取消","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["29977","34140","43097","-","-","-","-","5343","4251","-"]},{"name": "已审其他原因","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["3542","3647","3509","-","-","-","-","5","1","-"]},{"name": "已确认酒店取消","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["582","730","868","-","-","-","-","487","431","-"]},{"name": "已确认酒店取消","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["0","1","0","-","-","-","-","2806","2689","-"]},{"name": "已确认酒店取消","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["0","0","0","-","-","-","-","123","164","-"]},{"name": "已确认客人取消","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["45496","54574","59337","-","-","-","-","19132","13825","-"]},{"name": "已确认其他原因","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["0","0","0","-","-","-","-","16","26","-"]},{"name": "审核担保订单取消","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["0","0","0","-","-","-","-","89","77","-"]},{"name": "审核删除(入住日以后删除的订单)","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["0","0","0","-","-","-","-","3569","3403","-"]},{"name": "NOSHOW","type": "line","stack": "总量","itemStyle": {"normal": {"areaStyle": {"type": "default"}}},"data": ["0","0","0","-","-","-","-","19512","17856","-"]},{"center": ["30%","30%"],"radius": ["15%","25%"],"name": "2015-09-29至2015-10-08","type": "pie","tooltip": {"trigger": "item","formatter": "{a} <br/>{b} : {c} ({d}%)"},"itemStyle": {"normal": {"label": {"show": true},"labelLine": {"show": true}}},"data": [{"name": "正常成单","value": 475607},{"name": "原因不明","value": 0},{"name": "新单欺诈","value": 9630},{"name": "新单客人取消","value": 30376},{"name": "已审满房","value": 273711},{"name": "已审特殊满房","value": 376331},{"name": "已审变价","value": 63836},{"name": "已审客人取消","value": 116808},{"name": "已审其他原因","value": 10704},{"name": "已确认酒店取消","value": 3098},{"name": "已确认酒店取消","value": 5496},{"name": "已确认酒店取消","value": 287},{"name": "已确认客人取消","value": 192364},{"name": "已确认其他原因","value": 42},{"name": "审核担保订单取消","value": 166},{"name": "审核删除(入住日以后删除的订单)","value": 6972},{"name": "NOSHOW","value": 37368}]},{"center": ["70%","30%"],"radius": ["15%","25%"],"name": "2015-10-08","type": "pie","tooltip": {"trigger": "item","formatter": "{a} <br/>{b} : {c} ({d}%)"},"itemStyle": {"normal": {"label": {"show": true},"labelLine": {"show": true}}},"data": [{"name": "正常成单","value": "-"},{"name": "原因不明","value": "-"},{"name": "新单欺诈","value": "-"},{"name": "新单客人取消","value": "-"},{"name": "已审满房","value": "-"},{"name": "已审特殊满房","value": "-"},{"name": "已审变价","value": "-"},{"name": "已审客人取消","value": "-"},{"name": "已审其他原因","value": "-"},{"name": "已确认酒店取消","value": "-"},{"name": "已确认酒店取消","value": "-"},{"name": "已确认酒店取消","value": "-"},{"name": "已确认客人取消","value": "-"},{"name": "已确认其他原因","value": "-"},{"name": "审核担保订单取消","value": "-"},{"name": "审核删除(入住日以后删除的订单)","value": "-"},{"name": "NOSHOW","value": "-"}]}]}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
Vimoscommented, Oct 9, 2015

确认错误,series name重复,legend也重复,导致作图失败,Uncaught TypeError: Cannot read property ‘__animators’ of undefined。

保证彼此不重复后,正常作图。

1reaction
suxuekuncommented, Oct 9, 2015

建议尝试每次都 全的option no merge Setoption(full-new-option,true)

On Friday, 9 October 2015, Vimos Tan notifications@github.com wrote:

初步判断是stack的name,series的name重复导致作图失败

— Reply to this email directly or view it on GitHub https://github.com/ecomfe/echarts/issues/2077#issuecomment-146806118.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'animate' of undefined #603
Used library in React.js if render , getting this error animate = _useMotionConfig.animate.
Read more >
Uncaught TypeError: Cannot read properties of undefined ...
I'm currently trying to animate a few frames from a spritesheet using Phaser3. The page successfully renders the first frame of the animation...
Read more >
Cannot read property 'animation' of undefined - Help & Support
Hi @smokys,. Your best friend here is the browser debugging tools, with the simplest one being the console.log() method. Use that to print...
Read more >
Cannot read properties of undefined - GSAP - GreenSock
If I open the console when the animations don't load I get `Uncaught TypeError: Cannot read properties of undefined (reading 'end')`, ...
Read more >
Uncaught TypeError : Cannot read properties of undefined
Looking for ways to handle Uncaught TypeError: Cannot read property of undefined in JavaScript? This guide will help you to catch errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found