antvis / Graphin

🌌 A React toolkit for graph visualization based on G6.
https://github.com/antvis/graphin
MIT License
1.01k stars 263 forks source link

树形结构没办法更新数据 #255

Open a67586646 opened 3 years ago

a67586646 commented 3 years ago

https://github.com/antvis/Graphin/blob/0a3e4a5a5d501fc071007152e9462b50548287f5/packages/graphin/src/Graphin.tsx#L333

这里直接对前后的data下的children进行对比,但是我的data是动态获取的,每次的引用必然不同,这么一对比isGraphTypeChange必然为true了= =

pomelo-nwu commented 3 years ago

@a67586646 树形结构的数据更新支持的不够好,应该是个设计缺陷,晚些时候我们处理下。

frostace commented 3 years ago

@pomelo-nwu 想问下,树形布局目前有办法根据传入的数据动态的更新整张图吗?试了下用graph实例来调用refresh()好像也没效果

warwr1ck commented 2 years ago

@pomelo-nwu 想问下,树形布局目前有办法根据传入的数据动态的更新整张图吗?试了下用graph实例来调用refresh()好像也没效果

同问,这个问题解决了吗?

sawanoutsu commented 1 year ago

树形结构不能设置边的样式吗?