Downing 5320 ice8 2.2
✓ Published0🌍 Public
This example displays a family tree for Elrond Half-elven, using a D3 tree layout to visualize hierarchical relationships. The diagram shows three generations with colored nodes and links that group characters by their narrative significance, such as blue for Arwen and red for her brothers. The data is hardcoded in a JavaScript object, and the visualization is rendered as an SVG using d3.hierarchy and d3.tree. Node sizes correspond to a "value" property, while "type" and "level" properties control stroke and fill colors. The code also styles connecting paths with stroke colors based on the child’s level.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed