🌍 Public
Viewing a saved revision (read-only)
caff0e960550402e99e122e826229254
HarryPotter_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