Skip to main content
100%

Fork of Tree Graph

✓ Published0🌍 Public
Ssravya7136@gmail.com
Last edited Nov 9, 2025
Created on Nov 9, 2025
Forked from Tree Graph

This tree visualization displays a hierarchical food categorization system, starting with a root "Food" node that branches into categories, subcategories, and individual items. The chart uses distinct geometric shapes for each depth level: circles for categories, rectangles for subcategories, and polygons for items, with a red root node. Built with d3.v7, the code constructs a hierarchical structure using `d3.stratify()` and `d3.tree()` functions, then renders the tree with `d3.linkVertical()` for connections. Labels appear above or below nodes depending on whether they have children, with the entire SVG output styled to fill the viewport.

AI-generated description
MIT Licensed

Similar vizzes