Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Tree with Multiple Parents Example-prem

Public visualization

Fork of D3 Tree with Multiple Parents Example-prem

0 stars0🌍 Public
Pprabhanshuspro@gmail.com
Last edited Jun 7, 2024
Created on Jun 6, 2024

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 description

Comments

Sign in to join the discussion.

MIT Licensed