antvis/G6

Do you want to work on this issue?

You can request for a bounty in order to promote it!

antv-dagre layout, after resetting the data and rendering, the node order is not as expected #6490

majinkai posted onGitHub

Describe the bug / 问题描述

动态添加了一个节点,然后重新设置布局,给出了nodeOrder顺序,但是没有按照预期顺序自上而下排列,预期节点顺序是44在4上面,如果是destroy之后重新初始化,是没问题的。

https://codesandbox.io/p/sandbox/red-rgb-wzszl5

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

macOS

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


节点的顺序是基于 dagre 算法计算的,与在数据中的关系并没有关系。 图数据中的数据项顺序不具有任何含义

posted by Aarebecca 6 months ago

nodeOrder不起作用了,并且destroy之后重新初始化,是没问题的

posted by majinkai 6 months ago

你解决了吗 我也遇到了这个问题。 我用的g6版本5.0.12

posted by just-zl 3 days ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests