antvis/G6






The issue has been closed
报错Cannot read properties of undefined (reading 'on') #4952
7hao123 posted onGitHub
问题描述
使用相同的代码,有的页面可以将数据渲染出来,有的页面不能渲染出来,不能渲染的页面报错Cannot read properties of undefined (reading 'on'),怀疑是数据出错,可能是样例数据的label不能全为空吗?或者是不能指向多条边
重现链接
无
重现步骤
数据 "nodes": [ { "id": "7", "label": null, "icon": null, "x": 0.0, "y": 0.0,
},
{
"id": "24",
"label": null,
"icon": null,
"x": 0.0,
"y": 0.0,
},
{
"id": "73",
"label": null,
"icon": null,
"x": 0.0,
"y": 0.0,
},
{
"id": "61",
"label": null,
"icon": null,
"x": 0.0,
"y": 0.0,
}
],
"edges": [
{
"id": "20",
"label": null,
"source": "73",
"target": "7",
},
{
"id": "46",
"label": null,
"source": "61",
"target": "7",
},
{
"id": "48",
"label": null,
"source": "24",
"target": "7",
}
]
预期行为
我希望得到为什么出现这个bug的问题,以及解决方案
平台
- 操作系统: [ Windows,.]
- 网页浏览器: [Google Chrome]
- G6 版本: [4.8.17 ]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response