Sankey
Use a Sankey chart to show weighted flow between two categorical stages.
Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.
Basic flow
Map two dimensions to source and target nodes and one measure to link width, revealing how orders flow from status to delivery speed.
Key fields
visuals:
status_delivery_flow:
title: Status to delivery speed
description: Shows flow from order status to delivery-speed bucket.
type: sankey
query:
dimensions:
status: orders.status
delivery_bucket: orders.delivery_bucket
measures:
order_count: null
sort:
- field: value
direction: desc
limit: 40
Alternate flow
Replace the source and target dimensions to inspect category-to-status flow without changing the weighted graph contract.
Key fields
visuals:
category_status_flow:
title: Category to status flow
type: sankey
query:
dimensions:
category: orders.category
status: orders.status
measures:
order_count: null
sort:
- field: value
direction: desc
limit: 60
Spacious nodes
Increase presentation.node_gap when labels or links feel crowded, and tune curveness to keep parallel flows visually distinct.
Key fields
visuals:
category_status_flow_spacious:
title: Spacious category to status flow
type: sankey
presentation:
node_gap: 18
curveness: 0.32
query:
dimensions:
category: orders.category
status: orders.status
measures:
order_count: null
sort:
- field: value
direction: desc
limit: 60
API reference
Kind: chart. Renderer: echarts. Supported result shapes: graph.
| 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.curveness | number | 0.5 | 0–1 | Controls the curvature of graph or Sankey links. |
presentation.node_gap | number | 8 | 0 or greater | Sets the vertical gap between Sankey nodes. |
Accessibility. Use meaningful node labels and keep the hierarchy or flow small enough to follow without relying on color alone.