Fork of HTML Starter
✓ Published0🌍 Public
This example shows a company employee hierarchy as a tree diagram, with nodes colored by depth: red for the root, green for level-one employees, and blue for deeper levels. Each node displays two text labels—the employee name and position—and hover states change node fill and label styling. The code uses D3 v7’s `d3.stratify` to convert flat CSV data from a GitHub Gist into a hierarchy, then lays it out with `d3.tree`. Links are drawn as SVG lines, and nodes are styled via appended circles and text elements.
AI-generated descriptionMIT Licensed