Graflume · Alpha
Waterfall · Basic implementation · Common features
Show how positive and negative changes contribute to a running total. Start with only the required data and family encoding. Expand the code to run the same example. Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time.
Chart family · Default families
Waterfall
Show how positive and negative changes contribute to a running total.
- Quick API
waterfall()- Browser snapshot
graflume- mark
waterfall- Presets
- 1
Basic implementation
The smallest runnable chart
Start with only the required data and family encoding. Expand the code to run the same example.
Basic example
Show how positive and negative changes contribute to a running total.
StatusLoading
minimal-implementation
Loading
Basic example · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Common features
Features shared by every chart
Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time. Hover over a data mark. On supported charts, move the pointer along the axis to see the nearest value. All exact values are available in the table below.
Header
Add a chart title and supporting description inside the visualization.
StatusLoading
header
Loading
Header · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"locale": "en",
"title": {
"subtitle": "Waterfall chart uses runnable data and options to demonstrate running sum; connectors.",
"text": "Waterfall"
},
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"locale": "en",
"title": {
"subtitle": "Waterfall chart uses runnable data and options to demonstrate running sum; connectors.",
"text": "Waterfall"
},
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Tooltip
Reveal exact values from a mark or axis position. Authors can choose locale-aware date/time styles and a time zone with declarative options.
StatusLoading
tooltip
Loading
Tooltip · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"interaction": {
"hover": true,
"tooltip": {
"axis": "x",
"fields": [
{
"field": "category",
"format": "auto",
"label": "Category"
},
{
"field": "value",
"format": "number",
"label": "Value"
}
],
"title": "Waterfall · Tooltip",
"trigger": "axis"
}
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"interaction": {
"hover": true,
"tooltip": {
"axis": "x",
"fields": [
{
"field": "category",
"format": "auto",
"label": "Category"
},
{
"field": "value",
"format": "number",
"label": "Value"
}
],
"title": "Waterfall · Tooltip",
"trigger": "axis"
}
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Theme
Apply the current built-in theme from the selector and update every active example together.
StatusLoading
theme
Loading
Theme · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"locale": "en",
"theme": "graflume-light",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"locale": "en",
"theme": "graflume-light",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Legend
Explain the visual meaning of layers, categories, or continuous values.
StatusLoading
legend
- Legend:
legend · explicit · 3 channels
Loading
Legend · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Increase"
},
{
"id": "semantic-1",
"label": "Decrease"
},
{
"id": "semantic-2",
"label": "Total"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Waterfall · Legend",
"visible": true
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Increase"
},
{
"id": "semantic-1",
"label": "Decrease"
},
{
"id": "semantic-2",
"label": "Total"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Waterfall · Legend",
"visible": true
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Highlight
Emphasize a representative datum or spatial position to guide inspection.
StatusLoading
highlight
- Point and range highlights:
highlights[] · datum · category
Loading
Highlight · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "category",
"type": "datum",
"value": "Reactivations"
}
}
],
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "category",
"type": "datum",
"value": "Reactivations"
}
}
],
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Callout
Show an explanatory callout with automatic collision avoidance and multilingual wrapping.
StatusLoading
callout
- Custom callouts:
annotations[] · datum · category · callout · placement:auto
Loading
Callout · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "category",
"type": "datum",
"value": "Reactivations"
},
"text": "Point and range highlights · Reactivations"
}
],
"height": 620,
"interaction": {
"controls": {
"annotations": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
}
}
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "category",
"type": "datum",
"value": "Reactivations"
},
"text": "Point and range highlights · Reactivations"
}
],
"height": 620,
"interaction": {
"controls": {
"annotations": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
}
}
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Selection
Select and toggle data, then clear it from the background or Escape key.
StatusLoading
selection
- Interactive selection:
selection · multiple · toggle
Loading
Selection · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"interaction": {
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "category",
"mode": "multiple",
"toggle": true
}
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"interaction": {
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "category",
"mode": "multiple",
"toggle": true
}
},
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}View controls
Show or hide zoom, pan, reset, projection, fullscreen, and PNG export one menu at a time. Set controls: false to remove the entire toolbar.
StatusLoading
controls
Loading
View controls · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
}
},
"locale": "en",
"padding": {
"top": 52
},
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
}
},
"locale": "en",
"padding": {
"top": 52
},
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}Accessibility
Pair ARIA descriptions and keyboard guidance with a semantic data table.
StatusLoading
accessibility
Loading
Accessibility · Row data
Row data and zero-copy TypedArray columns share one data contract.
categoryordinal | valuequantitative |
|---|---|
| Opening MRR | 420 |
| New teams | 86 |
| Plan upgrades | 34 |
| Reactivations | 12 |
| Downgrades | -18 |
| Churn | -41 |
| Currency impact | -5 |
Browser API · Portable schema
Browser API
Graflume.waterfall()
const data = [
{
"category": "Opening MRR",
"value": 420
},
{
"category": "New teams",
"value": 86
},
{
"category": "Plan upgrades",
"value": 34
},
{
"category": "Reactivations",
"value": 12
},
{
"category": "Downgrades",
"value": -18
},
{
"category": "Churn",
"value": -41
},
{
"category": "Currency impact",
"value": -5
}
];
const options = {
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Waterfall · Accessibility example"
},
"height": 620,
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
};
Graflume.waterfall('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Waterfall · Accessibility example"
},
"height": 620,
"locale": "en",
"width": "container",
"x": {
"field": "category",
"title": "Revenue driver",
"type": "ordinal"
},
"y": {
"field": "value",
"title": "MRR change (kUSD)",
"type": "quantitative"
}
}