🌍 Public
Fork of Tree graph
This example visualizes a restaurant business hierarchy as a tree graph, with nodes representing categories like Location, Cuisine Type, and Price Range, each branching into specific subcategories. Node size encodes a numeric value, while stroke and fill colors differentiate types and levels. The code uses D3 v5’s `d3.tree()` and `d3.hierarchy()` to compute layout, rendering SVG paths for links and circles for nodes. Data is hardcoded in JavaScript, with styling applied via CSS classes.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed
Comments
Sign in to join the discussion.