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)

69b19edfc7e94d8284ccfb03119a2464

Fork of D3 Tree with Multiple Parents

0 stars0🌍 Public
VVoyagerIV
Last edited Oct 11, 2022
Created on Oct 11, 2022

This visualization adapts a D3 tree layout to support multiple parent nodes, showing how data entries like "Supply and demand" can be shared across different top-level categories. It loads JSON data and renders an interactive, zoomable SVG diagram with animated transitions. The code uses d3.tree, d3.hierarchy, d3.linkHorizontal, and d3.zoom, while manually deduplicating nodes with underscore.js and recalculating x/y positions to handle the shared nodes. A root node is added and filtered out, and links are remapped to the visible unique targets.

AI-generated description