Skip to main content
100%

D3 sun-burst graph

✓ Published1🌍 Public
SSubhendu Karmakar
Last edited Mar 13, 2024
Created on Mar 13, 2024

This example shows a sunburst visualization built from a small hierarchical dataset, where each ring segment represents a node in the tree and its angular width is proportional to the node’s value. The code uses D3 v7’s `d3.hierarchy`, `d3.partition` layout, and `d3.arc` to generate the radial paths, with semi-transparent dark fills and white strokes separating segments. While labels are commented out, the structure (root A1 with children B1 and B2, and nested leaves C1–D1) is clearly visible. The SVG is sized to the container and translated to center the chart.

AI-generated description

D3 Hierarchies

MIT Licensed

Similar vizzes