Waterfall chart
Use a waterfall chart to show how category contributions build from one total to another.
Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.
Basic
Use an ordered dimension and one measure with type: waterfall; the compiler derives the cumulative fields needed to show how each period contributes to the running total.
visuals:
revenue_waterfall:
title: Monthly revenue contribution
description: Shows each month contribution to total revenue.
type: waterfall
query:
dimensions:
purchase_month: orders.purchase_month
measures:
revenue: null
sort:
- field: purchase_month
direction: asc
limit: 18
Alternate measure
Replace revenue with order count to reuse the same running-contribution structure for volume rather than value.
visuals:
orders_waterfall:
title: Monthly order contribution
type: waterfall
query:
dimensions:
purchase_month: orders.purchase_month
measures:
order_count: null
sort:
- field: purchase_month
direction: asc
limit: 18
Labels and zoom
Enable show_labels for exact contributions and data_zoom when many categories make the running sequence too dense.
visuals:
revenue_waterfall_labeled:
title: Labeled revenue waterfall
type: waterfall
presentation:
show_labels: true
data_zoom: true
query:
dimensions:
category: orders.category
measures:
revenue: null
sort:
- field: value
direction: desc
limit: 12
API reference
Kind: chart. Renderer: echarts. Supported result shapes: category_delta.
| 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.data_zoom | boolean | false | true false | Adds inside and slider zoom controls to supported Cartesian charts. |
presentation.show_labels | boolean | false | true false | Shows value labels directly on chart marks. |
Accessibility. Use a descriptive title and unit, and do not rely on color alone to distinguish series or values.