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