Waterfall

A running total built step by step, as horizontal bars on one shared axis: each change runs from where the previous step ended (green up, red down) and a total runs from 0 to the running total; dashed connectors join the steps and the signed change is printed at the end of each row, so the direction never rests on colour alone. The axis comes from d3 nice() and ticks(), computed on the server, so there is no script. A hidden table gives each change and the running total. Motion-ready: each step fades in through --k from --p (build progress 0 to 1, default 1); the standalone render is the finished picture and reduced motion shows the end state.

Surfaces
webgoogle-apps-script-webmcp-appsandroid
Degraded on
SurfaceNote
pdfPrints the finished picture; no motion
Live preview
Revenue bridge, 2025 to 2026
Revenue 2025
1,240
New customers
+310
Expansion
+145
Churn
-220
Price changes
+60
Discounts
-85
Revenue 2026
1,450
0
500
1,000
1,500
2,000
Revenue (kEUR)
StepChangeRunning total
Revenue 2025Total1,240 kEUR
New customers+310 kEUR1,550 kEUR
Expansion+145 kEUR1,695 kEUR
Churn-220 kEUR1,475 kEUR
Price changes+60 kEUR1,535 kEUR
Discounts-85 kEUR1,450 kEUR
Revenue 2026Total1,450 kEUR
Fields
FieldTypeRequired
titlestring (optional, max 80).optional
stepsarray (required, 1 to 24) of {label (string, max 30, default "Step n"), value (number), kind (optional, "total" or "delta", default "delta")}. A delta step needs a finite value up to 1e12 in size; a total step without a value shows the running total, and with a value sets the running total to it (a note says when that differs from the steps before it). Other entries are left out with a note; steps beyond the first 24 are noted and not drawn. Any kind other than "total" is a delta.optional
x_labelstring (optional, max 40). Names the values on the axis.optional
unitstring (optional, max 12). Appended to the axis caption, the label and every value in the hidden table.optional
versioninteger (optional, default 1). The waterfall contract the payload was written for. Only version 1 exists; a higher whole number is drawn as version 1 with a note.optional
Example payload
{
  "type": "waterfall"
}
ARD catalog entry
{
  "identifier": "urn:air:a2uicatalog.ai:atom:waterfall",
  "displayName": "Waterfall",
  "type": "application/vnd.a2ui.atom+json",
  "url": "https://a2uicatalog.ai/atoms/waterfall",
  "capabilities": [
    "web",
    "google-apps-script-web",
    "mcp-apps",
    "android"
  ],
  "description": "A running total built step by step, as horizontal bars on one shared axis: each change runs from where the previous step ended (green up, red down) and a total runs from 0 to the running total; dashed connectors join the steps and the signed change is printed at the end of each row, so the direction never rests on colour alone. The axis comes from d3 nice() and ticks(), computed on the server, so there is no script. A hidden table gives each change and the running total. Motion-ready: each step fades in through --k from --p (build progress 0 to 1, default 1); the standalone render is the finished picture and reduced motion shows the end state.",
  "representativeQueries": [
    "show a waterfall: how changes add up to a total",
    "a running total built step by step, as horizontal bars on one shared axis: each change runs from whe",
    "render a waterfall"
  ]
}
← Full ARD catalog
Deploy your own Google Apps Script renderer

The renderer is an open-source Google Apps Script web app. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.

git clone https://github.com/a2uicatalog/a2ui
cd a2ui/apps-script-surface/gas-wired-renderer
clasp push && clasp deploy
Full deploy guide →