Fork of D3 Tree with Multiple Parents
✓ Published0🌍 Public
This example visualizes a tree where nodes can have multiple parents, using a custom layout to represent connections between concepts like “Government of the United States” and “Stock market.” The D3 v5 code starts with a standard `tree` layout, then collapses duplicate nodes by ID and manually recalculates x/y positions to accommodate shared children. Links are drawn with `linkHorizontal`, and nodes are positioned based on depth and unique instances. The visualization includes a zoom behavior and transitions for node movement, rendering data from a JSON file into an SVG with text labels.
AI-generated descriptionMIT Licensed