D3TreeTest
✓ Published0🌍 Public
This example shows a hierarchical tree visualization of world countries, organized by continent and region, with a zoomable SVG canvas. The code uses D3 v5’s `tree()` layout, `hierarchy()`, and `linkHorizontal()` to position nodes and draw curved links between parent and child elements. It loads the hierarchical structure from `data.json` via `json()`, and renders country names as text with font sizes scaled by node depth. The zoom behavior is enabled through `d3.zoom()`, allowing users to pan and scale the tree.
AI-generated descriptionMIT Licensed