d3-indented-tree API example #35
✓ Published0🌍 Public
EEE2dev
Last edited Dec 30, 2020
Created on Jul 25, 2019
This example demonstrates how to set a custom default color for nodes in a d3-indented-tree chart, using the `defaultColor` method to render all elements in deeppink. It initializes the visualization with the `d3.indentedTree` API, loading hierarchical data from a remote `flare.json` file, and appends the chart to the body via `showChart`. After a two-second delay, the chart invokes `alignLeaves(true)` to realign leaf nodes, showing a dynamic update. The code relies on d3.v6 and the d3-indented-tree library, with data bound by the `"name"` key.
AI-generated descriptionAPI examples for d3-indented-tree
myChart.defaultColor()
This example shows how to set the default color.
- 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