🌍 Public
Viewing a saved revision (read-only)
a09ec60add584eaf8e198a9efb0d2866
Fork of Fork of D3 Starter
This example shows a family tree as a hierarchical node-link diagram, with color-coded nodes that distinguish generations: red for the root, blue for grandparents, green for parents, and orange for children. Using D3.js v7, it builds the hierarchy with `d3.stratify()` and lays it out with `d3.tree()`, then renders the structure as an SVG. The code draws black links as lines and labels each node with text, positioning all elements based on the computed tree coordinates.
AI-generated description