---
title: "Waterfall Chart Image API — Cash-flow & P&L bridges | Imejis"
description: "Generate waterfall chart images for cash-flow bridges, P&L attribution and budget variance — pass the step deltas and render a fresh image per API call."
url: "https://www.imejis.io/components/chart/waterfall"
---

# Waterfall Chart Image API — Cash-flow & P&L bridges | Imejis

A running-total bar chart: each step adds or subtracts from the prior total, colored up/down with connectors.

## Use cases

- Cash-flow bridge images for finance updates
- Revenue-to-profit P&L attribution graphics
- Budget vs actual variance in board reports

## Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `chartType` | `'bar' \| 'line' \| 'area' \| 'waterfall' \| 'lollipop' \| 'step' \| 'slope' \| 'combo'` | `"bar"` | Chart style. waterfall draws single-series running-total bars (deltas), colored up/down. |
| `data` | `number[]` | `[]` | Single-series data values (ignored when series is set). |
| `series` | `object[]` | `[]` | Multi-series data: array of { name?, data: number[], color? }. |
| `labels` | `string[]` | `[]` | Category labels along the x-axis. |
| `colors` | `color[]` | `[]` | Color palette. Multi-series: one color per series. Single-series bar charts: colors[i] colors bar i individually (empty string = inherit). |
| `orientation` | `'vertical' \| 'horizontal'` | `"vertical"` | Bar direction for bar charts. |
| `stacked` | `boolean` | `false` | Stack multiple series on top of each other. |
| `stackType` | `'standard' \| 'percent'` | `"standard"` | Stacking mode when stacked: "standard" piles raw values; "percent" rescales each category to 100% (share of total, axis reads as %). |
| `sparkline` | `boolean` | `false` | Minimal mode: hides axes, grid and labels. |
| `showAxis` | `boolean` | `true` | Show the x/y axes. |
| `showGrid` | `boolean` | `true` | Show background grid lines. |
| `showValues` | `boolean` | `false` | Print each data value on the chart. |
| `showLegend` | `boolean` | — | Show the series legend. |
| `legendPosition` | `'top' \| 'right' \| 'bottom'` | `"bottom"` | Where the legend is placed. |
| `valueFormat` | `'number' \| 'compact' \| 'percent' \| 'currency'` | `"number"` | How values are formatted (1200, 1.2K, 12%, $1,200). |
| `currencySymbol` | `string` | `"$"` | Currency symbol used with the 'currency' format. |
| `textColor` | `color` | `"#52514e"` | Color of axis labels and values. |
| `gridColor` | `color` | `"#e6e6e3"` | Color of the grid lines. |
| `xAxisLabel` | `string` | — | Caption below the x-axis. |
| `yAxisLabel` | `string` | — | Caption beside the y-axis. |
| `lineWidth` | `number` (min 0) | `2` | Stroke width for line/area charts in pixels. |
| `opacity` | `number` | `1` | Overall component opacity from 0 (transparent) to 1 (opaque). |
| `borderWidth` | `number` | `0` | Border thickness in pixels around the component. |
| `borderColor` | `color` | `"transparent"` | Border color (any CSS color). |
| `borderStyle` | `'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'none'` | `"solid"` | Border line style. |
| `borderRadius` | `number` | `0` | Corner radius in pixels. |
| `boxShadow` | `string` | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |

## Design JSON (this variant)

```json
{
  "title": "Chart sample",
  "description": "A dynamic bar chart",
  "dimensions": {
    "width": 800,
    "height": 420
  },
  "background": {
    "color": "#ffffff"
  },
  "components": [
    {
      "id": "sample-chart",
      "key": "sales",
      "type": "chart",
      "position": {
        "x": 140,
        "y": 60
      },
      "rotation": 0,
      "size": {
        "width": 520,
        "height": 300
      },
      "dynamic": true,
      "properties": {
        "chartType": "waterfall",
        "data": [
          5000,
          1800,
          -1200,
          900,
          -1500
        ],
        "labels": [
          "Start",
          "Sales",
          "Refunds",
          "Upsell",
          "Costs"
        ],
        "colors": [],
        "orientation": "vertical",
        "showAxis": true,
        "showGrid": true,
        "showValues": true,
        "valueFormat": "compact",
        "opacity": 1
      }
    }
  ]
}
```

## Examples

### Revenue to net profit bridge

Gross revenue stepped down through costs to net profit, currency-formatted.

API overrides that reproduce this example:

```json
{
  "sales.chartType": "waterfall",
  "sales.data": [
    120000,
    -38000,
    -22000,
    -14000,
    -9000
  ],
  "sales.labels": [
    "Revenue",
    "COGS",
    "Payroll",
    "Marketing",
    "Other"
  ],
  "sales.showValues": true,
  "sales.valueFormat": "currency",
  "sales.currencySymbol": "$",
  "sales.colors": [
    "#16A34A",
    "#DC2626"
  ]
}
```

### Monthly cash-flow bridge

Opening balance adjusted by inflows and outflows to the closing balance.

API overrides that reproduce this example:

```json
{
  "sales.chartType": "waterfall",
  "sales.data": [
    8000,
    4200,
    -2600,
    1500,
    -3100
  ],
  "sales.labels": [
    "Open",
    "Income",
    "Rent",
    "Refunds",
    "Payroll"
  ],
  "sales.showValues": true,
  "sales.valueFormat": "compact"
}
```

## API overrides

Feed fresh numbers via '<key>.data' (or '<key>.series' for multi-series), and swap '<key>.labels' or '<key>.chartType' per render.

Flat override payload (`key.property` addressing) with the sample design's current values — send only the keys you want to change:

```json
{
  "sales.chartType": "bar",
  "sales.data": [
    12,
    28,
    20,
    34,
    26
  ],
  "sales.labels": [
    "Mon",
    "Tue",
    "Wed",
    "Thu",
    "Fri"
  ],
  "sales.colors": [],
  "sales.orientation": "vertical",
  "sales.showAxis": true,
  "sales.showGrid": true,
  "sales.showValues": false,
  "sales.valueFormat": "number",
  "sales.opacity": 1
}
```

```bash
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "sales.chartType": "bar",
    "sales.data": [
        12,
        28,
        20,
        34,
        26
    ],
    "sales.labels": [
        "Mon",
        "Tue",
        "Wed",
        "Thu",
        "Fri"
    ],
    "sales.colors": [],
    "sales.orientation": "vertical",
    "sales.showAxis": true,
    "sales.showGrid": true,
    "sales.showValues": false,
    "sales.valueFormat": "number",
    "sales.opacity": 1
}'
```

`{{YOUR_DESIGN_ID}}` and `{{YOUR_API_KEY}}` are placeholders: first create
the design in your account (paste the sample design JSON above into the
editor at https://app.imejis.io, or create it programmatically via the
imejis MCP server's `create_design` + `update_design` tools), then render
it with the design's id and one of your API keys.

Agents: the MCP server at https://api.imejis.io/api/mcp exposes this same
catalog as structured data via the `list_component_types` tool (property
kinds, allowed values, bounds, ready-to-use sample designs).

## Related

- [Chart component](https://www.imejis.io/components/chart.md) — full reference and FAQs
- [Line](https://www.imejis.io/components/chart/line.md) — A line chart for trends over time.
- [Area](https://www.imejis.io/components/chart/area.md) — A filled area chart — trends with volume emphasis.
- [Horizontal bars](https://www.imejis.io/components/chart/horizontal-bars.md) — Bars running left-to-right — rankings and long category names.
- [Stacked series](https://www.imejis.io/components/chart/stacked-series.md) — Two series stacked per category with a legend.
- [100% stacked](https://www.imejis.io/components/chart/percent-stacked.md) — Stacked bars rescaled so every column fills 100% — composition/share of total over time.
- [Sparkline](https://www.imejis.io/components/chart/sparkline.md) — Axis-free mini line — inline trend indicators and stat tiles.
- [Multi-line](https://www.imejis.io/components/chart/multi-line.md) — Several lines compared on one chart with a legend.
- [Lollipop](https://www.imejis.io/components/chart/lollipop.md) — A stem-and-dot bar alternative — cleaner than bars for ranking many categories.
- [Step line](https://www.imejis.io/components/chart/step.md) — A line that holds each value until the next point — for rates that change in steps.
- [Slope](https://www.imejis.io/components/chart/slope.md) — A two-point comparison — one line per series from a start value to an end value.
- [Combo (dual-axis)](https://www.imejis.io/components/chart/combo.md) — Bars and a line on one chart with a secondary right axis — pair a total with a rate at a different scale.
