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 metric 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
    presentation:
      type: hierarchy
      labels:
        density: automatic
        priority:
        - selected
        - anomaly
        - threshold
        maxCharacters: 12
        minimumSpacing: 6
        tooltipFallback: true
    query:
      type: aggregate
      dimensions:
      - category
      - status
      metrics:
      - order_count
      sort:
      - field: order_count
        direction: desc
      limit: 80

Three-level hierarchy

Add a third ordered dimension for deeper nesting and enable roaming for drill-down exploration.

Key fields
visuals:
  category_state_status_sunburst:
    title: Category, state, and status sunburst
    type: sunburst
    presentation:
      type: hierarchy
      roam: true
    query:
      type: aggregate
      dimensions:
      - category
      - state
      - status
      metrics:
      - order_count
      sort:
      - field: order_count
        direction: desc
      limit: 120

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:
      type: aggregate
      dimensions:
      - state
      - status
      metrics:
      - order_count
      sort:
      - field: order_count
        direction: desc
      limit: 80
    presentation:
      type: hierarchy

API reference

Kind: chart. Renderer: echarts. Supported result shapes: hierarchy_nodes.

FieldTypeDefaultAllowed valuesDescription
query.dimensionsfield mappingGroups query results and supplies category or hierarchy labels.
query.limitintegerno limitpositive integerCaps the number of rows returned to the renderer.
query.metricsmetric mappingSelects governed semantic metrics consumed by the visual shape.
query.sortsort listOrders query results by a returned field or metric alias.
presentation.labelslabel policyhiddenhidden automatic dense alwaysControls deterministic label density, priority, truncation, and tooltip fallback.
presentation.roambooleanfalsetrue falseAllows governed panning and zooming for compatible hierarchy and geographic visuals.

Accessibility. Use meaningful node labels and keep the hierarchy or flow small enough to follow without relying on color alone.