Skip to main content
100%

Family Tree

✓ Published0🌍 Public
CCH SAMPATH
Last edited Apr 13, 2023
Created on Apr 13, 2023

This example visualizes a family tree as a branching set of animated nodes and links on a black background. The SVG renders green circles for each person and straight lime-colored paths that connect parents to children, with names labeled inside the nodes. The code builds the hierarchy from an array of child-parent pairs using `d3.stratify` and `d3.tree`, then animates the paths and circles with `transition()` and `duration()`. Both the connections and nodes are appended to a single `<g>` element, and text labels are positioned using the tree’s computed x and y coordinates.

AI-generated description
MIT Licensed

Similar vizzes