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
Wwonjiky
Last edited Dec 13, 2022
Created on Dec 13, 2022

This example shows a tree diagram where nodes can have multiple parents, allowing shared entities like "Supply and demand" and "Foreign worker" to branch from both "Government of the United States" and "Stock market." The code uses d3.tree and d3.hierarchy to lay out the hierarchical structure, with d3.linkHorizontal drawing curved links between nodes. The node positions are recalculated after duplicate nodes are removed using Underscore.js, while d3.zoom enables panning and zooming of the SVG rendering. Links and nodes transition smoothly to their updated positions, with the most recently selected parent branch highlighted in steelblue.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed