Skip to main content
Public

Share visualization

Loading preview…

Tree Example

vizhub.com

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

Before sharing, review the publishing checklist.

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 & exportPNG, HTML, source ZIP

Tree Example

13
Ssalimjivani
Last edited Apr 5, 2022
Created on Apr 5, 2022
Forked from HTML Starter

This example shows an interactive tree diagram built with D3.js, where clicking a node collapses or expands its children with smooth animated transitions. The data is a hardcoded JSON structure representing a family hierarchy, with names like Roshan and Nimmat. The code uses `d3.layout.tree` to compute node positions and `d3.svg.diagonal` to draw curved links between parent and child nodes. Node and link elements are rendered as SVG circles, text, and paths, with transitions handled by D3's `transition` API.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed