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
My tree-data lies as a plain array at the beginning, so converting to a nested structure is necessary before processing with flextree.
If I use the d3.stratify function it creates a nested structure with the data property containing all the original properties of every node. If I then call the layout.hierarchy on this data it crates a new hierarchy containing the data property containing the data property containing all the original properties 😞
If I call layout directly on the stratified data the resulting layout does not have the right properties.
So shat I was forced to do instead was using different function to create the nested structure (see list-to-tree-lite) to create the flextree hierarchy to compute the layout.
It would be great if the flextree would be able to implement the d3.stratify function as well or at least operate on the stratified data with an option to re-use the data property.
The text was updated successfully, but these errors were encountered:
Just skip the layout.hierarchy() step and go straight to layout() :)
"Computing the layout of a tree data structure involves two steps: first, create a hierarchy from the data, and second, invoke the layout function." (source)
My tree-data lies as a plain array at the beginning, so converting to a nested structure is necessary before processing with flextree.
If I use the d3.stratify function it creates a nested structure with the data property containing all the original properties of every node. If I then call the layout.hierarchy on this data it crates a new hierarchy containing the data property containing the data property containing all the original properties 😞
If I call layout directly on the stratified data the resulting layout does not have the right properties.
So shat I was forced to do instead was using different function to create the nested structure (see list-to-tree-lite) to create the flextree hierarchy to compute the layout.
It would be great if the flextree would be able to implement the d3.stratify function as well or at least operate on the stratified data with an option to re-use the data property.
The text was updated successfully, but these errors were encountered: