🌍 Public
Viewing a saved revision (read-only)
fe9166dc925a488b81080506be116270
array to tree
This example converts a randomly shuffled array of integers into a hierarchical tree structure. The visualization shows the resulting dendrogram with red-bordered circles representing nodes and black lines for parent-child links. Using d3.stratify and d3.tree, the array elements are organized into a tree layout with SVG rendering. Text labels display each node’s value, and transitions animate their appearance based on depth. The code updates smoothly when re-rendered with new random data.
AI-generated descriptionConverts an Array into tree.