Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Tree with Multiple Parents

Public visualization

Fork of D3 Tree with Multiple Parents

0 stars0🌍 Public
Ssuheyl
Last edited Apr 28, 2022
Created on Apr 28, 2022

This example shows a D3 tree layout with multiple parent nodes, where shared child nodes like "Supply and demand" and "Foreign worker" appear under both "Government of the United States" and "Stock market." The visualization deduplicates nodes by ID using Underscore.js’s `_.uniq` and remaps links to the unique targets. It uses `d3.tree`, `d3.hierarchy`, and `d3.linkHorizontal` for layout and path generation, with SVG text labels and interactive zoom and transition animations applied via `d3.zoom` and `transition`. Data is loaded from a local JSON file.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed