Skip to main content
100%

Fork of D3 Tree with Multiple Parents

✓ Published0🌍 Public
TTyler D:
Last edited Dec 20, 2022
Created on Dec 20, 2022

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 description
MIT Licensed

Similar vizzes