Skip to main content
100%

tree

✓ Published0🌍 Public
BBhavyaMammai
Last edited Jul 14, 2023
Created on Jul 13, 2023
Forked from Hello VizHub

This example shows a hierarchical tree diagram of food categories, from the root “Food” down to leaf items like Spinach, Carrot, Orange, and Apple. The visualization uses D3 v3’s `d3.layout.tree` to position nodes and links, with SVG rendering and animated transitions when the tree updates. Each node is color-coded by its type (e.g., type1 through type4), and links are drawn as stepped paths using `d3.line` with `curveStepAfter`. The code includes interactive zoom via `d3.behavior.zoom` and tooltips, with data pulled from an external JSON file.

AI-generated description
MIT Licensed

Similar vizzes