Fork of D3 Tree with Multiple Parents
✓ Published0🌍 Public
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 descriptionMIT Licensed