D3.js Tree Example
✓ Published0🌍 Public
This example shows a hierarchical tree layout with three levels of nodes—root, category, and subcategory—rendered as SVG shapes with distinct colors and symbols for each layer. It uses D3.js v5, loading the library via UNPKG, and applies the d3.tree layout, d3.hierarchy, d3.linkHorizontal, and d3.symbol APIs to position nodes and draw curved links. The data is hardcoded in JavaScript, and the visualization distinguishes node types using d3.scaleOrdinal for both color and shape.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed