Q2
✓ Published0🌍 Public
This example displays a hierarchical tree of food categories, from the root "Food" down to specific items like "Almonds" and "Broccoli." It uses D3 v7's `d3.stratify` and `d3.tree` layouts to compute node positions, with horizontal curved links drawn via `d3.linkHorizontal`. Nodes are rendered as SVG circles colored by depth, with labels positioned to the right for leaves and left for internal nodes. A legend at the top-left explains the color mapping for each hierarchy layer.
AI-generated descriptionMIT Licensed