Sunburst Chart

A hierarchy as nested rings — each ring is a level, each segment its share of the parent. Click a segment to zoom in, the centre to go back. Drawn as SVG by the component, rendered on the server and themed by the design tokens.

Part of @tectra-ng/charts (npm install @tectra-ng/charts, also included in tectra-ng).

Features10APIThemingAccessibility

Basic

Each ring is a level and each segment its share of the parent; deeper rings fade from the colour of their branch. Click a segment with children to zoom into it, the centre to go back.

Arrow keys move between values
Disk usage. Sunburst chart, GB used 150: Photos 52%, Work 29.3%, Music 12%, Apps 6.7%
CategoryValueOf total
Photos7852%
Photos / 20243322%
Photos / 2024 / Trips1812%
Photos / 2024 / Family117.3%
Photos / 2024 / Other42.7%
Photos / 20253120.7%
Photos / 2025 / Trips2214.7%
Photos / 2025 / Family96%
Photos / 2026149.3%
Work4429.3%
Work / Projects3523.3%
Work / Projects / Design128%
Work / Projects / Code74.7%
Work / Projects / Video1610.7%
Work / Archive96%
Music1812%
Music / Albums138.7%
Music / Podcasts53.3%
Apps106.7%

Levels

levels limits the rings shown at once — deeper levels appear as you zoom in. showLabels turns the names off.

Arrow keys move between values
Disk usage, two levels. Sunburst chart, Total 150: Photos 52%, Work 29.3%, Music 12%, Apps 6.7%
CategoryValueOf total
Photos7852%
Photos / 20243322%
Photos / 20253120.7%
Photos / 2026149.3%
Work4429.3%
Work / Projects3523.3%
Work / Archive96%
Music1812%
Music / Albums138.7%
Music / Podcasts53.3%
Apps106.7%

Colors

color on a node paints its whole branch. [drill]="false" keeps the chart at one level — clicks still report segmentClick.

Arrow keys move between values
Team by role. Sunburst chart, Total 58: Engineering 65.5%, Design 12.1%, Sales 22.4%
CategoryValueOf total
Engineering3865.5%
Engineering / Frontend1424.1%
Engineering / Backend1831%
Engineering / Mobile610.3%
Design712.1%
Design / Product58.6%
Design / Brand23.4%
Sales1322.4%
Sales / Direct915.5%
Sales / Partners46.9%

Events

segmentClick reports the path, the value and the item of a segment; focusChange reports zooming in and out.

Arrow keys move between values
Sales by region. Sunburst chart, Total 41: North 43.9%, South 56.1%
CategoryValueOf total
North1843.9%
North / Oslo1229.3%
North / Bergen614.6%
South2356.1%
South / Rome1536.6%
South / Naples819.5%

Click a segment or the centre.

Loading and empty

loading keeps the size with a skeleton; empty data shows "No data".

No data

Live

New data redraws the rings.

Arrow keys move between values
Shuffled hierarchy. Sunburst chart, Total 64: A 20.3%, B 46.9%, C 32.8%
CategoryValueOf total
A1320.3%
A / A146.3%
A / A2914.1%
B3046.9%
B / B11320.3%
B / B21726.6%
C2132.8%

Accessibility

Tab to the chart: ←/→ walk the segments of one parent, ↓ goes to the first child, ↑ to the parent, Enter zooms in and Escape zooms out. Every segment is announced with its path, value and share; screen readers also get a summary and a hidden table.

Arrow keys move between values
Disk usage. Sunburst chart, GB used 150: Photos 52%, Work 29.3%, Music 12%, Apps 6.7%
CategoryValueOf total
Photos7852%
Photos / 20243322%
Photos / 2024 / Trips1812%
Photos / 2024 / Family117.3%
Photos / 2024 / Other42.7%
Photos / 20253120.7%
Photos / 2025 / Trips2214.7%
Photos / 2025 / Family96%
Photos / 2026149.3%
Work4429.3%
Work / Projects3523.3%
Work / Projects / Design128%
Work / Projects / Code74.7%
Work / Projects / Video1610.7%
Work / Archive96%
Music1812%
Music / Albums138.7%
Music / Podcasts53.3%
Apps106.7%

Design tokens

dt sets the hole, the gaps, the corner radius, how much deeper rings fade, the labels and the centre of one chart.

Arrow keys move between values
Custom rings. Sunburst chart, Total 150: Photos 52%, Work 29.3%, Music 12%, Apps 6.7%
CategoryValueOf total
Photos7852%
Photos / 20243322%
Photos / 2024 / Trips1812%
Photos / 2024 / Family117.3%
Photos / 2024 / Other42.7%
Photos / 20253120.7%
Photos / 2025 / Trips2214.7%
Photos / 2025 / Family96%
Photos / 2026149.3%
Work4429.3%
Work / Projects3523.3%
Work / Projects / Design128%
Work / Projects / Code74.7%
Work / Projects / Video1610.7%
Work / Archive96%
Music1812%
Music / Albums138.7%
Music / Podcasts53.3%
Apps106.7%

Pass through

pt reaches the parts — segment, label, center, plot, tooltip and more.

Arrow keys move between values
Bold labels. Sunburst chart, Total 150: Photos 52%, Work 29.3%, Music 12%, Apps 6.7%
CategoryValueOf total
Photos7852%
Photos / 20243322%
Photos / 2024 / Trips1812%
Photos / 2024 / Family117.3%
Photos / 2024 / Other42.7%
Photos / 20253120.7%
Photos / 2025 / Trips2214.7%
Photos / 2025 / Family96%
Photos / 2026149.3%
Work4429.3%
Work / Projects3523.3%
Work / Projects / Design128%
Work / Projects / Code74.7%
Work / Projects / Video1610.7%
Work / Archive96%
Music1812%
Music / Albums138.7%
Music / Podcasts53.3%
Apps106.7%

Unstyled

unstyled removes the tectra styles: no gaps, no fade, no motion — the rings, the colours, zooming, the tooltip and the keyboard stay, ready for your own CSS.

Arrow keys move between values
Unstyled chart. Sunburst chart, Total 9: A 55.6%, B 44.4%
CategoryValueOf total
A555.6%
A / A1333.3%
A / A2222.2%
B444.4%