Sunburst
Use a sunburst to compare hierarchical levels as concentric part-to-whole rings.
Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.
Two-level hierarchy
Order two dimensions from parent to child and provide one measure for sector size to show category composition by status.
Key fields
visuals:
category_status_sunburst:
title: Category and status hierarchy
description: Shows category and status hierarchy by order count.
type: sunburst
query:
dimensions:
category: orders.category
status: orders.status
measures:
order_count: null
sort:
- field: value
direction: desc
limit: 80
Alternate hierarchy
Replace the parent dimension with state to reuse the hierarchy contract for a geographic breakdown.
Key fields
visuals:
state_status_sunburst:
title: State and status sunburst
type: sunburst
query:
dimensions:
state: orders.state
status: orders.status
measures:
order_count: null
sort:
- field: value
direction: desc
limit: 80
Three-level hierarchy
Add a third ordered dimension for deeper nesting, set initial_depth to control the first visible level, and enable roaming for exploration.
Key fields
visuals:
category_state_status_sunburst:
title: Category, state, and status sunburst
type: sunburst
presentation:
initial_depth: 2
roam: true
query:
dimensions:
category: orders.category
state: orders.state
status: orders.status
measures:
order_count: null
sort:
- field: value
direction: desc
limit: 120
API reference
Kind: chart. Renderer: echarts. Supported result shapes: hierarchy.
| Field | Type | Default | Allowed values | Description |
|---|---|---|---|---|
query.dimensions | field mapping | — | — | Groups query results and supplies category, hierarchy, matrix, graph, or geographic labels. |
query.limit | integer | no limit | positive integer | Caps the number of rows returned to the renderer. |
query.measures | measure mapping | — | — | Selects the governed semantic measures consumed by the visual shape. |
query.sort | sort list | — | — | Orders query results by a returned field or measure alias. |
presentation.initial_depth | integer | -1 | -1 or greater | Sets the deepest hierarchy level expanded initially; -1 expands all levels. |
presentation.roam | boolean | false | true false | Enables supported pan, zoom, or hierarchy navigation interactions. |
Accessibility. Use meaningful node labels and keep the hierarchy or flow small enough to follow without relying on color alone.