Animal Kingdom Tree - Assignment 8
✓ Published0🌍 Public
This example presents a hierarchical tree diagram of the animal kingdom, with a red root node for Animals, teal nodes for Mammals and Birds, and yellow leaf nodes for individual species. The visualization uses D3.js v7’s `hierarchy`, `tree`, and `linkVertical` APIs to compute the layout and draw the SVG paths, while `select` and `attr` manage the rendering. The data is defined inline in JavaScript, and the tree is rendered as an SVG with circle nodes and text labels.
AI-generated descriptionAnimal Kingdom Tree
A hierarchical tree diagram displaying the animal kingdom structure using D3.js.
Structure
- Root (Red): Animals
- Layer 2 (Teal): Mammals, Birds
- Layer 3 (Yellow):
- Under Mammals: Lion, Elephant, Whale
- Under Birds: Eagle, Penguin, Parrot
Usage
Open index.html in a web browser to view the interactive
tree diagram.
MIT Licensed