🌍 Public
Fork of D3 Tree with Multiple Parents Example-prem
This example visualizes a directed graph with multiple parent nodes sharing child nodes, using a D3 tree layout with custom link and node positioning. The code builds a hierarchical structure from a JSON data source, deduplicates shared nodes, and renders it as SVG paths and text labels. It uses D3 v5 APIs such as `tree()`, `hierarchy()`, `linkHorizontal()`, and `zoom()`, along with Underscore.js helpers for node filtering and positioning. Interactive features include clicking nodes to collapse or expand their children, with smooth transitions and dynamic link styling based on selected source nodes.
AI-generated descriptionMIT Licensed
Comments
Sign in to join the discussion.