Skip to main content
100%

HarryPotter_tree

✓ Published0🌍 Public
AALIMINETI SPOORTHY REDDY
Last edited Oct 30, 2025
Created on Oct 30, 2025
Forked from Tree

This example shows a vertical family tree built with D3 v7, displaying multiple generations of a fictional family from a single root ancestor downward. It uses the `d3.stratify()` API to convert a flat list of `{child, parent}` pairs into a hierarchical structure, then lays out the nodes with the `d3.tree()` layout and renders the connecting links using `d3.linkVertical()`. Each node is represented as a blue circle with a text label, positioned via SVG transforms within a fixed `1000x900` viewBox, with the data hardcoded in the script.

AI-generated description
MIT Licensed

Similar vizzes