Waterfall
Docs ยท Visuals
Waterfall chart JSON format.
How a starting amount becomes an ending one: each column starts where the last one ended.
Try it
Edit the example and the visual redraws. Mistakes show the same messages the API returns.
The visual
Change any number or label. The chart follows.
Fields
| Field | Type | Rule |
|---|---|---|
nameKeyRequired | string | The key in each row that holds the step's name. Up to 80 characters. Names may repeat. |
valueKeyRequired | string | The key in each row that holds the change, or a total's value. Up to 80 characters. Must differ from nameKey. |
totalKeyOptional | string | The key in each row that marks a total: true for a total row, false or left out for a change. Up to 80 characters. Must differ from nameKey and valueKey. Without it every row is a change. |
invertOptional | boolean | true draws rises in the bad colour and falls in the good one, for a cost bridge where a rise is bad. |
formatOptional | string | number (the default), compact or percent. A percent value is a fraction: 0.25 shows as 25%. |
prefixOptional | string | Shown before every figure, such as "$". Up to 80 characters. |
suffixOptional | string | Shown after every figure, such as " k". Up to 80 characters. |
dataRequired | array | Up to 40 steps, drawn in the order you list them; may be empty. |
| Field | Type | Rule |
|---|---|---|
<nameKey>Required | string | The step's name. Up to 80 characters. Names may repeat: steps are positional. |
<valueKey>Optional | number | A change row needs it: any number, up or down. A total row may give it, to set the running total, or leave it out or null, to show the total so far. Without totalKey every row is a change. |
<totalKey>Optional | boolean | true makes the row a total, drawn as a full column from zero. false or left out makes it a change. |
Good to know
- A row with totalKey true draws a full column. With a value it sets the running total (an opening balance or a checkpoint); with the value left out or null it shows the total so far (a closing balance).
- Rises take the scheme's good colour and falls its bad colour, and every label carries its sign. invert: true swaps the colours for a cost bridge.
- A waterfall holds no row list: to change it, send the whole document with PUT /v1/visuals/{id}/data.
Example
{
"nameKey": "step",
"valueKey": "amount",
"totalKey": "isTotal",
"prefix": "$",
"data": [
{ "step": "Start MRR", "amount": 12000, "isTotal": true },
{ "step": "New", "amount": 2400 },
{ "step": "Expansion", "amount": 600 },
{ "step": "Churn", "amount": -900 },
{ "step": "End MRR", "isTotal": true }
]
}Send it from your code
Paste the document in the editor, or replace it with a PUT to the visual's push URL. The push API page has the details and examples.
Next: Treemap JSON format