Waterfall chart
Waterfall chart for a total built from signed steps, with starts and totals marked by the author.
Use a waterfall chart to show how a start value becomes an end value through a series of additions and subtractions.
Profit is three quarters of revenue after a grant
Thousands of dollars; each bar starts where the last one ended
IncreaseDecreaseTotal
This chart cannot be displayed here: it needs JavaScript and WebGL.
The same chart in each style
Source
```chart
type: waterfall
title: Profit is three quarters of revenue after a grant
subtitle: Thousands of dollars; each bar starts where the last one ended
data:
inline:
- step: Sales
amount: 120
kind: start
- step: Costs
amount: -45.5
- step: Tax
amount: -14.5
- step: Grant
amount: 30
- step: Profit
amount: 90
kind: total
encoding: {x: step, y: amount, measure: kind}
axes:
y: {label: Amount, unit: k}
```
Fields that matter
type: waterfallwithencoding.xfor the step name andencoding.yfor its signed amountencoding.measurenames the field that marks a row:start(alsoabsolute,reset) begins from that value,total(alsosubtotal) ends a run, and anything else is a change added to the running sum- A total that disagrees with the sum of the steps is reported, not replaced
axes.ysetslabel,format,unit,minandmaxstyle.ratiosets the width to height ratio, andstyle.facet_scale: freegives each facet its own value scale
Interactions
- Hover or focus a bar to read the step’s change and the running total it leads to.
- Open the Table view, Download PNG or CSV, or Expand the chart.