Skip to main content
100%

Fork of D3.js collapsibleRRR tree with boxes

✓ Published1🌍 Public
GGavinDiaper
Last edited Apr 19, 2023
Created on Apr 19, 2023

A collapsible, boxed tree visualization maps hierarchical JSON data into an interactive SVG diagram using D3.js v3. Nodes appear as colored rectangles, with the root in yellow, intermediate types in blue and green, and leaf nodes in purple. Users can click nodes to expand or collapse their subtrees, with animated transitions applied to the layout. The code employs the `d3.layout.tree` API to compute the tree structure and a custom `breadthFirstTraversal` function to assign colors and manage node spacing, while a zoom and drag behavior is enabled via `d3.behavior.zoom`.

AI-generated description

This is a description using Markdown.

MIT Licensed

Similar vizzes