Skip to main content
100%

Collapsible Tree Example

✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Jan 8, 2014

This example shows a static tree diagram visualizing hierarchical data, with nodes and links styled using dynamic colors based on the data attributes. The visualization encodes numeric values as the radius of each node’s circle and uses distinct colors for node fill, stroke, and links. The code uses the D3.js layout in `d3.layout.tree` and the `d3.svg.diagonal` API to draw curved links. It loads data from an embedded JavaScript array and renders the graphic as an SVG, with the tree laid out horizontally from left to right.

AI-generated description

This is a simple d3.js tree diagram with dynamic styling added to the nodes and links as used as an example in the book D3 Tips and Tricks.

It is derived from the Mike Bostock Collapsible tree example but it is a VERY cut down version without the ability to update (collapse).

mit Licensed

Similar vizzes