Skip to main content
100%

d3-indented-tree API example #24

✓ Published0🌍 Public
EEE2dev
Last edited Dec 30, 2020
Created on Jan 14, 2020

The example demonstrates how to append a numeric value to tree nodes using the `nodeBar()` method from the d3-indented-tree plugin. It visualizes hierarchical data parsed from an HTML `<aside>` element, with semicolon-delimited levels and a `size1` column driving node bar lengths. The chart is initialized via `d3.indentedTree()`, configured with `linkLabel("size1")` and `nodeSort("size1")`, then rendered by appending a `<div>` to the body and calling `showChart()`. The visualization highlights how numeric attributes can be encoded directly onto tree nodes while preserving hierarchy.

AI-generated description

API examples for d3-indented-tree


myChart.nodeBar()

This example shows how to a second numeric value to a node with myChart.nodeBar().


Acknowledgements:

mit Licensed

Similar vizzes