You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently nodes are returned in pre-order depth-first traversal. This means that siblings are adjacent and in their original order.
I believe it would be preferable to return nodes in breadth-first traversal order, by ascending depth. The root is first, as before, and then siblings are returned in the order defined by hierarchy.sort, defaulting to descending value. Thus, nodes at depth i + 1 are always drawn on top of nodes of depth i—not just their direct ancestors.
The text was updated successfully, but these errors were encountered:
mbostock
changed the title
Layouts should return nodes sorted by depth, then sibling order.
Sort nodes by depth then sibling order.
Nov 3, 2015
Currently nodes are returned in pre-order depth-first traversal. This means that siblings are adjacent and in their original order.
I believe it would be preferable to return nodes in breadth-first traversal order, by ascending depth. The root is first, as before, and then siblings are returned in the order defined by hierarchy.sort, defaulting to descending value. Thus, nodes at depth i + 1 are always drawn on top of nodes of depth i—not just their direct ancestors.
The text was updated successfully, but these errors were encountered: