Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Tree with Multiple Parents

Public visualization

Viewing a saved revision (read-only)

2aa0fff417694e8d81e0732339337bd0

Fork of D3 Tree with Multiple Parents

0 stars0🌍 Public
Wwonjiky
Last edited Dec 14, 2022
Created on Dec 14, 2022

This example demonstrates a D3.js tree diagram where multiple parent nodes can share the same child nodes, creating a directed acyclic graph rather than a strict hierarchy. It visualizes data where the Government of the United States and the Stock market both connect to common concepts like Supply and demand and Foreign worker. The code uses d3.hierarchy, d3.tree, and d3.linkHorizontal to render SVG links, with underscore.js to deduplicate nodes by ID and manually recalculate x/y positions. Pan-zoom and transitions animate node movement, with a YouTube video embedded for context.

AI-generated description