Walk an am5hierarchy series and return every node below its root, in
depth-first order.
The root itself is skipped. amCharts hierarchy data is one root object whose
children are the branches — commonly a synthetic "Root" the chart is even
configured to hide (topDepth: 1) — so keeping it would add a level that
always holds one node worth 100% of the chart, and put every reader one
extra step away from the data.
Depth-first is what makes the order usable: MAIDR's treemap addresses a node
by [depth][index within depth] and takes the index from the order the
nodes were declared in, so a walk that visits each subtree completely gives
every level its left-to-right order.
Walk an am5hierarchy series and return every node below its root, in depth-first order.
The root itself is skipped. amCharts hierarchy data is one root object whose
childrenare the branches — commonly a synthetic "Root" the chart is even configured to hide (topDepth: 1) — so keeping it would add a level that always holds one node worth 100% of the chart, and put every reader one extra step away from the data.Depth-first is what makes the order usable: MAIDR's treemap addresses a node by
[depth][index within depth]and takes the index from the order the nodes were declared in, so a walk that visits each subtree completely gives every level its left-to-right order.