d3-indented-tree API example #25
✓ Published0🌍 Public
EEE2dev
Last edited Dec 30, 2020
Created on Jan 14, 2020
This example demonstrates how a d3-indented-tree chart can display a second numeric value on its nodes and update that value with a transition. It initially shows node bars for the "size1" column, then after a two-second delay, it switches to the "size2" column while keeping the existing scale. The code uses the `d3.indentedTree` API with `.nodeBar()` to render the bars and `.nodeSort()` to reorder nodes based on the new column. Data is loaded from an HTML `<aside>` element, parsed as a semicolon-delimited hierarchy, and rendered using D3 v6.
AI-generated descriptionAPI examples for d3-indented-tree
myChart.nodeBar() - 2
This example shows how to a second numeric value to a node with myChart.nodeBar(). When transitioning to reflect a differnt column by the node bar, you can:
- sort the nodes according to the new column with myChart.nodeSort()
- keep the current scale with the property updateScales
- for documentation, go to https://github.com/EE2dev/d3-indented-tree
- for other examples, go to https://github.com/EE2dev/d3-indented-tree#examples
Acknowledgements:
mit Licensed