Skip to main content
Public

Share visualization

Loading preview…

Fork of D3.js collapsible tree with boxes

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportHTML, source ZIP

Fork of D3.js collapsible tree with boxes

0 stars0Public
Bbhargavarathod
Last edited Mar 31, 2022
Created on Mar 31, 2022
Forked from Hello VizHub

This example presents a collapsible tree diagram rendered as colored boxes, with each node displaying a label, version, and type. It uses D3.js v3 with the `d3.layout.tree` API and SVG elements to create an interactive hierarchy, where clicking a node expands or collapses its children. The tree is initialized from a JSON file that contains the node hierarchy, including link names and directions. The code includes features such as zooming and dragging through `d3.behavior.zoom`, and it dynamically adjusts the SVG dimensions based on the tree's depth and maximum width.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed