Skip to main content
100%

d3-indented-tree API example #31

✓ Published0🌍 Public
EEE2dev
Last edited Dec 30, 2020
Created on Sep 21, 2019

This example demonstrates interactive re-sorting of an indented tree diagram using the d3-indented-tree plugin. The visualization initially renders a hierarchy from CSV data embedded in an HTML `<aside>` tag, displaying node labels with a secondary numeric field. After a two-second delay, the `nodeSort("num")` method reorders sibling nodes by their `num` values, while `linkWidth(100)` simultaneously adjusts the link thickness. The chart is built with D3.js v6 and the d3-indented-tree library, which handles the tree layout, links, and animations. The example highlights how to dynamically manipulate node ordering and visual properties after initial rendering.

AI-generated description

API examples for d3-indented-tree


myChart.nodeSort()

This example shows how to resort the nodes of the tree.


Acknowledgements:

mit Licensed

Similar vizzes