---
title: "Charts"
description: "Every chart type and its props."
---

> Documentation Index
> Fetch the complete documentation index at: https://sandrinodm.github.io/deckster/llms.txt
> Use this file to discover all available pages before exploring further.

# Charts

Use this page to look up the props of a chart or number component: what each takes, its defaults, and the limits `deck lint` holds it to. To pick a chart for a message, start at [choosing a chart](https://sandrinodm.github.io/deckster/data-and-diagrams/choosing-a-chart/); this page assumes you know which one you want.

- [`<BigNumber>`](https://sandrinodm.github.io/deckster/reference/charts/#props-BigNumber): One number is the message ("we cut onboarding to 3 days"); it beats a chart of one or two bars.
- [`<StatRow>`](https://sandrinodm.github.io/deckster/reference/charts/#props-StatRow): Two to four headline numbers that belong together, each with its change and an optional sparkline.
- [`<Comparison>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Comparison): Two values, before and after or A against B, where the difference is the message.
- [`<BarChart>`](https://sandrinodm.github.io/deckster/reference/charts/#props-BarChart): Compare categories or rank them: sorted horizontal bars for long labels, columns for a few periods.
- [`<LineChart>`](https://sandrinodm.github.io/deckster/reference/charts/#props-LineChart): Change over time: one line, or one highlighted among muted context lines, each labeled at its end.
- [`<AreaChart>`](https://sandrinodm.github.io/deckster/reference/charts/#props-AreaChart): A trend whose size matters (volume, backlog), or a composition over time when stacked.
- [`<Slope>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Slope): Change between two points for several items: who rose and who fell, at a glance.
- [`<Donut>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Donut): Part of a whole when one or two parts matter ("more than half"), five slices at most.
- [`<Pictogram>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Pictogram): A proportion that should feel human: "3 in 10", risk, reach.
- [`<Progress>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Progress): Progress toward a goal, one bar or a short list, with the target marked.
- [`<Waterfall>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Waterfall): How a total builds up or breaks down between two totals (a bridge: last year to this year).
- [`<Funnel>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Funnel): Drop-off through ordered stages, where the share that carries on between stages is the point.
- [`<Scatter>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Scatter): The relationship between two measures, with the notable points labeled and an optional trend.
- [`<MarketMovement>`](https://sandrinodm.github.io/deckster/reference/charts/#props-MarketMovement): One entity changes position over dated observations against peers on two fixed axes.
- [`<Heatmap>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Heatmap): A pattern across two dimensions (weekday by hour), with the cell that matters outlined.
- [`<RetentionCohorts>`](https://sandrinodm.github.io/deckster/reference/charts/#props-RetentionCohorts): Retention by signup cohort and elapsed age, with the starting populations beside the rates.
- [`<ProfitPool>`](https://sandrinodm.github.io/deckster/reference/charts/#props-ProfitPool): Segment revenue is a width and contribution margin a height, making area represent profit.
- [`<Sparkline>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Sparkline): A trend as context beside a number, in an aside or a sentence; StatRow and BigNumber have their own.
- [`<Table>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Table): Exact values, lookups or mixed units, about five rows by four columns, with the row that matters emphasized.

## How to read an entry

Each entry starts with when to use the component, when to avoid it, the messages it is the right form for (single number, comparison, trend and so on), the shape of its data rows and its limits: the numbers `deck lint` holds it to, such as the most bars or series. `coloredSeries` in a limit is the size of the brand's categorical palette, counted without the series a highlight mutes. Then a still of a published slide that uses it, its own props, a line naming the shared props it also takes, and an example in MDX. A prop name a chart does not take is refused with the closest name ("`value` is not a prop of BarChart; did you mean `y`?").

How `highlight`, `annotations` and `at` work together is on [highlights and annotations](https://sandrinodm.github.io/deckster/data-and-diagrams/highlights-and-annotations/); `BigNumber`, `StatRow`, `Progress` and the other number components are explained on [number components](https://sandrinodm.github.io/deckster/data-and-diagrams/number-components/).

`deck charts --json` prints the same catalog, plus two fields this page does not show: `nulls`, how each chart draws a missing value (null, an empty CSV cell, text that is not a number), and `accessibility`. It also gives `native`, the PowerPoint chart `deck export --pptx` builds for the component: `BarChart`, `Comparison`, `Progress`, `Waterfall` and `Funnel` become bar charts; `LineChart`, `Slope` and `Sparkline` line charts; `AreaChart` an area chart; `Donut` a doughnut; `Scatter` a scatter chart; and `Table` a table. `BigNumber`, `StatRow`, `Pictogram`, `Heatmap`, `RetentionCohorts`, `ProfitPool` and `MarketMovement` have no native chart type.

`<Table>` here is the component; the `table` layout has [its own page](https://sandrinodm.github.io/deckster/reference/layouts/table/).

## Shared props

Several charts take these props, with the same meaning in each. They are listed once here; each entry below names the ones it takes.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `at` | `number` | — | The step that reveals the whole figure; shown from the start when left out. |
| `caption` | `string` | — | The measure, unit and period above the plot ("Tickets per month, 2026"); the slide title states the takeaway. |
| `source` | `string` | — | Where the data comes from, set under the plot. |
| `label` | `string` | — | The accessible name; built from the data when left out. |
| `data` | `Row[] \| string` | — | Rows inline (data={[...]}), imported from a JSON or CSV file in the deck folder, or the name of a dataset in the slide's `data:` frontmatter. Two rows for the same category (and series) throw. |
| `highlight` | `string \| string[] \| Highlight` | — | What the chart is about. A series name, else a category (or max, min, first, last), several, or a `Highlight` object (see `types.Highlight`); everything else drops to the brand's context color. `at` turns it on at a step. |
| `annotations` | `Annotation[]` | — | Callouts, reference lines, shaded ranges and brackets as objects with a `type` of `callout`, `reference`, `range` or `bracket`; their fields are under `types` as `Annotation.callout`, `Annotation.reference`, `Annotation.range` and `Annotation.bracket`. Each takes `at`. |
| `format` | `"number" \| "standard" \| "compact" \| "currency" \| "percent" \| "delta" \| "percent-delta" \| "currency-delta" \| FormatOptions` | — | How values are written, over the brand's number style (compact, its currency and locale). Percent values are already in percent: 34 is 34%. `digits` fixes the fraction digits; without it currency in full writes cents or none (never one decimal), and a value under 1 keeps a significant digit. |
| `unit` | `string` | — | The unit after each value: "ms", "°C", "h", "trees". A scale unit (K, M, B) sits tight and keeps a currency sign: unit="M" with currency writes $1.2M. |
| `labels` | `"auto" \| "all" \| "highlight" \| "ends" \| "none"` | `auto` | Which values are labeled on the marks. `auto` labels every value when few enough to read (and drops the value axis), else the highlighted ones. |
| `legend` | `boolean` | — | Force the legend on or off. Charts label series directly and show a legend only when they cannot (grouped and stacked bars); with a highlight the legend names the highlighted series and "everything else". |

## Components

### BigNumber

- **Use when:** One number is the message ("we cut onboarding to 3 days"); it beats a chart of one or two bars.
- **Avoid:** A number without the comparison that gives it meaning; add `from` or `context`.
- **Data:** No rows: `value` (number or text), `label`, and `from` or `delta` for the change.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `number \| string` | — | The number, formatted by the brand, or text as it should read ("3 in 10"). |
| `label` (required) | `string` | — | What it counts, in about six words. |
| `context` | `string` | — | The comparison in a line: "down from 14 days in 2025". |
| `from` | `number` | — | The value it is compared with; the change is written as the delta. |
| `delta` | `string` | — | The change as written, when not computed from `from`. |
| `tone` | `"positive" \| "negative" \| "neutral"` | — | Whether the change is good news; from `better` and the sign when left out. |
| `better` | `"up" \| "down"` | `up` | Which way is good news, for the delta's color. |
| `relative` | `boolean` | `true; false for values in percent` | Write the change from `from` as a percentage of it, or in the unit (`false`). The default is a percentage, except for values in percent (unit "%" or format "percent"), whose change is written in points: "+7 pts". A change across zero is always written in the unit. |
| `trend` | `number[]` | — | Recent values for a sparkline set against the figure. |

Also takes the shared props `at`, `caption`, `source`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<BigNumber
  value={3}
  unit="days"
  label="from signup to a live workspace"
  from={14}
  better="down"
  relative={false}
/>
```

### StatRow

- **Use when:** Two to four headline numbers that belong together, each with its change and an optional sparkline.
- **Avoid:** More than four numbers (use a Table) or numbers in different units that the audience must compare.
- **Data:** No rows: `stats`, a list of `RowStat` (see `types.RowStat`).
- **Limits:** `stats` 4

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `stats` (required) | `RowStat[]` | — | Two to four stats; set `highlight: true` on the one the point rests on. |

Also takes the shared props `at`, `caption`, `source`, `label`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<StatRow
  stats={[
    { value: 38, unit: '%', label: 'fewer tickets', highlight: true },
    { value: 2.5, unit: 'h', label: 'first reply', from: 14, better: 'down' },
  ]}
/>
```

### Comparison

- **Use when:** Two values, before and after or A against B, where the difference is the message.
- **Avoid:** Several items changing between two points: use Slope.
- **Data:** No rows: `from` and `to`, each { value, label }. A value below zero is drawn from a zero line both bars share, towards the start edge, so a loss never reads as a gain.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `from` (required) | `{ value: number; label: string }` | — | The value before, or the first. |
| `to` (required) | `{ value: number; label: string }` | — | The value after, or the second: the one the point is about. |
| `better` | `"up" \| "down"` | `up` | Which way is good news. |
| `relative` | `boolean` | `true; false for values in percent` | Write the change from `from` as a percentage of it, or in the unit (`false`). The default is a percentage, except for values in percent (unit "%" or format "percent"), whose change is written in points: "+7 pts". A change across zero is always written in the unit. |

Also takes the shared props `at`, `caption`, `source`, `label`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Comparison
  from={{ value: 14, label: '2025' }}
  to={{ value: 2.5, label: 'October 2026' }}
  unit="h"
  better="down"
/>
```

### BarChart

- **Use when:** Compare categories or rank them: sorted horizontal bars for long labels, columns for a few periods.
- **Avoid:** One or two bars (use BigNumber or Comparison), or before/after for many items (use Slope).
- **Data:** Rows with a category field and one or more number fields (wide), or category, series and value fields (long).
- **Limits:** `categories` 12, `seriesNeedingHighlight` 3, `categoriesNeedingHighlight` 6, `coloredSeries` the brand palette size

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The category field; the first text field when left out. |
| `y` | `string \| SeriesInput \| (string \| SeriesInput)[]` | — | The value field or fields, one series each (see `types.SeriesInput`); `at` reveals a series at a step. Every number field when left out. |
| `series` | `string` | — | For long data, the field whose values name the series (then `y` is the one value field). |
| `orientation` | `"auto" \| "vertical" \| "horizontal"` | `auto` | Columns or bars; `auto` turns horizontal when labels do not fit under columns. |
| `stacked` | `boolean` | `false` | Stack the series instead of grouping them. |
| `sort` | `boolean \| "ascending" \| "descending"` | `false` | Sort by value, largest first for `true`; "Other" stays last. |
| `min` | `number` | — | The axis minimum: above zero only with `truncate` (drawn with an axis break, the value axis and an "Axis starts at" note); lint reports it otherwise. |
| `max` | `number` | — | The axis maximum. |
| `truncate` | `boolean` | `false` | Allow `min` above zero, with a break across every bar. |
| `reveal` | `"series" \| "categories" \| RevealOption` | — | Build the marks in steps, one series or one category per step. A string starts at step 1; the object form (see `types.RevealOption`) starts at `from`, a later step. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `highlight`, `annotations`, `format`, `unit`, `labels`, `legend` (see the shared props table on this page).

Example:

```mdx
<BarChart
  data={regions}
  x="region"
  y="revenue"
  format="currency"
  sort
  highlight="EMEA"
/>
```

### LineChart

- **Use when:** Change over time: one line, or one highlighted among muted context lines, each labeled at its end.
- **Avoid:** More than about five lines without a highlight (spaghetti), two measures on two axes, or a single point (use BigNumber).
- **Data:** Rows in time order with a time field and one number field per line (or long rows with `series`).
- **Limits:** `seriesNeedingHighlight` 3, `categoriesNeedingHighlight` 6, `coloredSeries` the brand palette size, `points` 2

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The category field; the first text field when left out. |
| `y` | `string \| SeriesInput \| (string \| SeriesInput)[]` | — | The value field or fields, one series each (see `types.SeriesInput`); `at` reveals a series at a step. Every number field when left out. |
| `series` | `string` | — | For long data, the field whose values name the series (then `y` is the one value field). |
| `zero` | `boolean` | `false` | Start the value axis at zero; otherwise it hugs the data and says where it starts. |
| `min` | `number` | — | A fixed axis minimum. |
| `max` | `number` | — | A fixed axis maximum. |
| `reveal` | `"series" \| "categories" \| RevealOption` | — | Build the marks in steps, one series or one category per step. A string starts at step 1; the object form (see `types.RevealOption`) starts at `from`, a later step. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `highlight`, `annotations`, `format`, `unit`, `labels`, `legend` (see the shared props table on this page).

Example:

```mdx
<LineChart
  data={tickets}
  x="month"
  y={['2025', '2026']}
  highlight="2026"
  annotations={[{ type: 'callout', x: 'Jun', label: 'Redesign ships' }]}
/>
Range highlight, muting the rest of the line:
<LineChart
  data={tickets}
  x="month"
  y="2026"
  highlight={{ range: ['Jun', 'Sep'] }}
/>
```

### AreaChart

- **Use when:** A trend whose size matters (volume, backlog), or a composition over time when stacked.
- **Avoid:** Comparing several series (use LineChart); only the bottom stacked series and the total read well.
- **Data:** As LineChart.
- **Limits:** `seriesNeedingHighlight` 3, `coloredSeries` the brand palette size, `points` 2

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The category field; the first text field when left out. |
| `y` | `string \| SeriesInput \| (string \| SeriesInput)[]` | — | The value field or fields, one series each (see `types.SeriesInput`); `at` reveals a series at a step. Every number field when left out. |
| `series` | `string` | — | For long data, the field whose values name the series (then `y` is the one value field). |
| `stacked` | `boolean` | `false` | Stack the areas; put the series that matters first. |
| `min` | `number` | — | Ignored below zero: areas start at zero. |
| `max` | `number` | — | A fixed axis maximum. |
| `reveal` | `"series" \| "categories" \| RevealOption` | — | Build the marks in steps, one series or one category per step. A string starts at step 1; the object form (see `types.RevealOption`) starts at `from`, a later step. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `highlight`, `annotations`, `format`, `unit`, `labels`, `legend` (see the shared props table on this page).

Example:

```mdx
<AreaChart
  data={replies}
  x="week"
  y="hours"
  unit="h"
  annotations={[{ type: 'reference', value: 4, label: 'Target' }]}
/>
```

### Slope

- **Use when:** Change between two points for several items: who rose and who fell, at a glance.
- **Avoid:** Grouped bars for the same data; more than about ten items.
- **Data:** Rows with an item field and two number fields (`from` and `to`).
- **Limits:** `categories` 10, `categoriesNeedingHighlight` 6

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The category field; the first text field when left out. |
| `from` | `string` | — | The first value's field; the first number field when left out. |
| `to` | `string` | — | The second value's field. |
| `fromLabel` | `string` | — | The left column's heading. |
| `toLabel` | `string` | — | The right column's heading. |
| `better` | `"up" \| "down"` | `up` | Which way is good news. |
| `tone` | `boolean` | `false` | Color items by better or worse instead of the lead color. |
| `zero` | `boolean` | `false` | Start the scale at zero. |
| `annotations` | `Annotation[]` | — | Callouts on a point (`type: 'callout'`, fields in `types['Annotation.callout']`) and reference lines across the plot (`type: 'reference'`, fields in `types['Annotation.reference']`); ranges and brackets throw here. Each takes `at`. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `highlight`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Slope
  data={teams}
  x="team"
  from="2025"
  to="2026"
  better="down"
  tone
  highlight={['Billing', 'Payroll']}
/>
```

### Donut

- **Use when:** Part of a whole when one or two parts matter ("more than half"), five slices at most.
- **Avoid:** More than five slices or close values (use sorted bars); two donuts side by side.
- **Data:** Rows with a name field and a value field.
- **Limits:** `slices` 5

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The category field; the first text field when left out. |
| `y` | `string` | — | The value field; the first number field when left out. |
| `center` | `"share" \| "total" \| "none" \| string` | — | The figure in the centre. |
| `centerLabel` | `string` | — | The line under the centre figure. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `highlight`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Donut
  data={channels}
  x="channel"
  y="conversations"
  highlight="Chat"
  centerLabel="on chat"
/>
```

### Pictogram

- **Use when:** A proportion that should feel human: "3 in 10", risk, reach.
- **Avoid:** Precise shares or totals above 100 units.
- **Data:** No rows: `value` filled units of `total`.
- **Limits:** `total` 100

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `number` | — | How many units are filled. |
| `total` | `number` | `10` | How many units there are, at most 100. |
| `label` (required) | `string` | — | What the filled units are. |
| `shape` | `"person" \| "circle" \| "square"` | `person` | The unit's shape. |
| `columns` | `number` | — | Units per row; chosen from the room when left out (10 or 20 for totals divisible by ten). |

Also takes the shared props `at`, `caption`, `source` (see the shared props table on this page).

Example:

```mdx
<Pictogram value={3} total={10} label="questions now end in the help centre" />
```

### Progress

- **Use when:** Progress toward a goal, one bar or a short list, with the target marked.
- **Avoid:** Gauges and speedometers.
- **Data:** No rows: `value`, `max`, `target`, `label`, or `items` (see `types.ProgressItem`).

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `number` | — | How far it has come, for a single bar. |
| `max` | `number` | `100` | The whole. |
| `target` | `number` | — | The goal, marked on the track. |
| `label` | `string` | — | What is measured, for a single bar. |
| `items` | `ProgressItem[]` | — | Several bars instead of one. |

Also takes the shared props `at`, `caption`, `source`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Progress
  value={31}
  target={40}
  unit="%"
  label="of questions solved by self-serve"
/>
```

### Waterfall

- **Use when:** How a total builds up or breaks down between two totals (a bridge: last year to this year).
- **Avoid:** A stacked bar with many colors.
- **Data:** Rows with a step name and a change; total rows (named in `totals`) hold a level, or none for the running total.
- **Limits:** `categories` 10

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The category field; the first text field when left out. |
| `y` | `string` | — | The change field; the first number field when left out. |
| `totals` | `string[]` | — | The steps that are totals; the first step when left out. |
| `better` | `"up" \| "down"` | `up` | Which way is good news, for rises and falls ("down" for costs). Steps keep their tone colors; `highlight` mutes the changes it does not name, never the totals. |
| `reveal` | `"series" \| "categories" \| RevealOption` | — | Build the bridge in steps: the totals and the step names show from the start, then `"categories"` brings in one change per step and `"series"` all of them at once. A string starts at step 1; the object form (see `types.RevealOption`) starts at `from`. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `highlight`, `annotations`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Waterfall
  data={bridge}
  x="step"
  y="cost"
  totals={['2025', '2026']}
  better="down"
  format="currency"
/>
```

### Funnel

- **Use when:** Drop-off through ordered stages, where the share that carries on between stages is the point.
- **Avoid:** Unordered categories (use BarChart), or stages that grow (`deck lint` warns).
- **Data:** Rows in stage order with a stage name and a count.
- **Limits:** `categories` 7

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The category field; the first text field when left out. |
| `y` | `string` | — | The count field. |
| `reveal` | `"series" \| "categories" \| RevealOption` | — | Build the funnel in steps: `"categories"` brings in one stage per step with the share that carried on into it, `"series"` the whole funnel at once. A string starts at step 1; the object form (see `types.RevealOption`) starts at `from`. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `highlight`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Funnel data={journey} x="stage" y="people" highlight="Opened an article" />
```

### Scatter

- **Use when:** The relationship between two measures, with the notable points labeled and an optional trend.
- **Avoid:** Dual-axis lines for two measures.
- **Data:** Rows with two number fields and a name field (and a group field for `series`).

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The x field; the first number field. |
| `y` | `string` | — | The y field; the second number field. |
| `label` | `string` | — | The field naming each point, for highlights, callouts and labels (not the accessible name here). |
| `series` | `string` | — | The field grouping points into colored series. |
| `xLabel` | `string` | — | What x measures, at the end of the x axis. |
| `yLabel` | `string` | — | What y measures, at the top of the y axis. |
| `xFormat` | `Format` | — | How x values are written (format and unit are y's). |
| `xUnit` | `string` | — | The unit after x values. |
| `trend` | `boolean` | `false` | Draw the least-squares trend line, clipped to the plot. |
| `zero` | `boolean` | `false` | Start both axes at zero. |
| `annotations` | `Annotation[]` | — | Callouts on a point (`type: 'callout'`, fields in `types['Annotation.callout']`) and reference lines across the plot (`type: 'reference'`, fields in `types['Annotation.reference']`); ranges and brackets throw here. Each takes `at`. |

Also takes the shared props `at`, `caption`, `source`, `data`, `highlight`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Scatter
  data={squads}
  x="hours"
  y="csat"
  label="squad"
  trend
  highlight={['Billing']}
  xLabel="Hours to resolve"
  yLabel="Rated good, %"
/>
```

### Heatmap

- **Use when:** A pattern across two dimensions (weekday by hour), with the cell that matters outlined.
- **Avoid:** Exact values to compare (use a Table).
- **Data:** Long rows with a column field, a row field and a value field.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `x` | `string` | — | The column field. |
| `y` | `string` | — | The row field. |
| `value` | `string` | — | The value field. |
| `highlight` | `{ x?, y? } \| { x?, y? }[]` | — | Cells (or a whole row or column) to outline. |
| `scale` | `[string, string]` | `["Fewer","More"]` | The words at the ends of the scale legend. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Heatmap
  data={load}
  x="hour"
  y="day"
  value="tickets"
  highlight={{ x: '9–12', y: 'Mon' }}
/>
```

### Sparkline

- **Use when:** A trend as context beside a number, in an aside or a sentence; StatRow and BigNumber have their own.
- **Avoid:** A trend that is the message (use LineChart).
- **Data:** `values` (numbers, oldest first) or rows with one number field.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `values` | `number[]` | — | The values, oldest first. |
| `data` | `Row[] \| string` | — | Rows instead of values. |
| `y` | `string` | — | The field of the rows to draw. |
| `highlight` | `"last" \| "max" \| "min"` | `last` | The point to mark and label. |
| `value` | `boolean` | `true` | Write the marked value at the end. |
| `height` | `number` | `80` | The height in canvas pixels. |

Also takes the shared props `at`, `caption`, `source`, `label`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<Sparkline values={[9, 7.2, 5.8, 4.9, 3.6, 2.5]} unit="h" />
```

### Table

- **Use when:** Exact values, lookups or mixed units, about five rows by four columns, with the row that matters emphasized.
- **Avoid:** A pattern across many values (use a chart); the full dataset (put it in the appendix).
- **Data:** Rows; `columns` picks and labels fields (see `types.TableColumn`). Numbers are written exactly (no rounding) unless a format sets `digits`; pass numbers, not text such as "31%", so they align and format.
- **Limits:** `rows` 8

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `columns` | `(string \| TableColumn)[]` | — | The columns in order; every field when left out. |
| `highlight` | `{ row?, column?, cell? }` | — | Rows (by first-column text or index), a column or cells, marked the brand's way. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `format` (see the shared props table on this page).

Example:

```mdx
<Table
  data={plans}
  columns={['plan', { key: 'cost', format: 'currency', bar: true }]}
  highlight={{ row: 'Team' }}
/>
```

### RetentionCohorts

Give each cohort its starting size and a row for each observed age. Write `82` for 82%. A zero prints as `0%`, while an unobserved age stays blank. [Retention cohorts example](https://sandrinodm.github.io/deckster/decks/lookbook/#/chart-retention-cohorts)

- **Use when:** Retention by signup cohort and elapsed age, with the starting populations beside the rates.
- **Avoid:** Calendar-period activity (use Heatmap or LineChart).
- **Data:** Long rows with a cohort name, a whole elapsed age, a starting population and retention in percent.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `cohort` | `string` | `cohort` | The cohort name field. |
| `age` | `string` | `age` | The elapsed age field, a nonnegative whole number. |
| `ageUnit` | `string` | `Month` | The heading prefix for each age. |
| `value` | `string` | `retained` | The retention field. Pass 82 for 82%. |
| `size` | `string` | `size` | The starting population field. |
| `sizeLabel` | `string` | `Size` | The heading of the starting population column. |
| `focus` | `{ cohort: string; age: number; from?: number }` | — | Outline the cohort at `from`, then compare cohorts at `age` one step later. Leave out `from` for a static comparison at `age`. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data` (see the shared props table on this page).

Example:

```mdx
<RetentionCohorts
  data={retention}
  focus={{ cohort: "April", age: 3, from: 1 }}
/>
```

### ProfitPool

Use the same currency and scale for every segment’s revenue. Width represents revenue, height measures the contribution margin from zero, and area corresponds to the segment’s contribution profit or loss. [Profit pool example](https://sandrinodm.github.io/deckster/decks/lookbook/#/chart-profit-pool)

- **Use when:** Segment revenue is a width and contribution margin a height, making area represent profit.
- **Avoid:** Profit is the only measure that matters (use BarChart).
- **Data:** One row per segment with positive revenue and a margin in percent. A margin may be negative.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `segment` | `string` | `segment` | The segment name field. |
| `revenue` | `string` | `revenue` | The revenue field. All rows must use the same currency and scale. |
| `margin` | `string` | `margin` | The contribution margin field. Pass 25 for 25%. |
| `highlight` | `string` | — | The segment to emphasize. Defaults to the largest profit contributor. |
| `buildFrom` | `number` | — | The margin step. Before it the chart shows revenue only, and the next step highlights profit. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `format`, `unit` (see the shared props table on this page).

Example:

```mdx
<ProfitPool
  data={segments}
  highlight="Memberships"
  format="currency"
  buildFrom={1}
/>
```

### MarketMovement

Give each observation an ISO date in `YYYY-MM-DD` form. `highlight` names the entity whose positions form a trail. Each peer appears at the dates for which it has data. [Market movement example](https://sandrinodm.github.io/deckster/decks/lookbook/#/chart-market-movement)

- **Use when:** One entity changes position over dated observations against peers on two fixed axes.
- **Avoid:** Movement in only one measure (use LineChart) or a single snapshot (use Scatter).
- **Data:** Long rows with an entity name, ISO calendar date and two numeric measures.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `entity` | `string` | `entity` | The entity name field. |
| `date` | `string` | `date` | The YYYY-MM-DD date field. |
| `x` (required) | `string` | — | The horizontal measure field. |
| `y` (required) | `string` | — | The vertical measure field. |
| `xLabel` | `string` | — | The horizontal axis title. |
| `yLabel` | `string` | — | The vertical axis title. |
| `xFormat` | `Format` | — | The horizontal axis number format. The shared format is for y. |
| `highlight` (required) | `string` | — | The entity whose positions form the trail. |
| `buildFrom` | `number` | — | The step for the second date. Each later date adds one step. |

Also takes the shared props `at`, `caption`, `source`, `label`, `data`, `format` (see the shared props table on this page).

Example:

```mdx
<MarketMovement
  data={market}
  x="density"
  y="onTime"
  highlight="Wrenhaul"
  buildFrom={1}
/>
```

## Types

Several props take objects. Their fields:

**`RowStat`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `number \| string` | — | The number, formatted by the brand, or text as it should read. |
| `label` (required) | `string` | — | What it counts, in a few words. |
| `delta` | `string` | — | The change as written ("+12% since 2025"); computed from `from` when that is given. |
| `from` | `number` | — | The value it is compared with, for a computed delta. |
| `relative` | `boolean` | `true; false for values in percent` | Write the change from `from` as a percentage of it, or in the unit (`false`). The default is a percentage, except for values in percent (unit "%" or format "percent"), whose change is written in points: "+7 pts". A change across zero is always written in the unit. |
| `better` | `"up" \| "down"` | `up` | Which way is good news, for a computed delta. |
| `tone` | `"positive" \| "negative" \| "neutral"` | — | Whether the change is good news; from `better` and the sign when left out. |
| `trend` | `"up" \| "down" \| "flat"` | — | Which way the change points, for a delta written without a sign. |
| `spark` | `number[]` | — | Recent values, oldest first, drawn as a sparkline under the label. |
| `highlight` | `boolean` | — | The stat the point rests on: an accent rule and the accent color. |
| `format` | `Format` | — | How this stat's number is written, over the row's. |
| `unit` | `string` | — | This stat's unit, over the row's; it resets the row's format style unless it is a scale (K, M, B). |

**`ProgressItem`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | — | What is measured. |
| `value` (required) | `number` | — | How far it has come; past `max` the track runs on and marks where the whole ended. |
| `max` | `number` | `100` | The whole. |
| `target` | `number` | — | The goal, marked on the track. |
| `unit` | `string` | — | This bar's unit, over the figure's; it resets the figure's format style. |
| `format` | `Format` | — | How this bar's numbers are written, over the figure's. |
| `highlight` | `boolean` | — | The bar the point is about, when there are several. |

**`TableColumn`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `key` (required) | `string` | — | The field. |
| `label` | `string` | — | The header; the field name when left out. |
| `format` | `Format` | — | How the column's numbers are written; exact (as many digits as the data has) when left out. |
| `unit` | `string` | — | The unit after each number. |
| `bar` | `boolean` | `false` | Draw an in-cell bar to scale from zero. |
| `align` | `"left" \| "right"` | — | The alignment; numbers right, text left when left out. |

**`SeriesInput`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `field` (required) | `string` | — | The field that holds the series' values. |
| `label` | `string` | — | The name the chart labels the series with; the field name when left out. |
| `at` | `number` | — | The step that reveals the series. |

**`FormatOptions`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `style` | `"number" \| "currency" \| "percent"` | — | `percent` values are in percent already (34 is 34%); `currency` adds the currency sign. |
| `notation` | `"standard" \| "compact"` | — | `compact` writes 1.2M; `standard` every digit. |
| `currency` | `string` | — | An ISO 4217 currency code, such as `EUR`. |
| `digits` | `number` | — | Exactly this many fraction digits, 0 to 4. |
| `signed` | `boolean` | — | Always show the sign, for changes: `+12`. |

**`Highlight`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `series` | `string \| string[]` | — | Series to keep in color. |
| `category` | `string \| string[]` | — | Categories to keep in color (or max, min, first, last). |
| `point` | `{ series?, category } \| { series?, category }[]` | — | Single points. |
| `range` | `[string, string]` | — | A stretch of categories, `[first, last]`, both ends inclusive. On a line chart it covers the segments between consecutive highlighted points, so the line is drawn heavier and in color from the first category to the last; every segment outside it, including the one after the last category, stays muted. A range of one category colors no segment (use `category` for a single point). |
| `at` | `number` | — | The step that turns the highlight on; the chart shows its own colors before it. |

**`RevealOption`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `by` (required) | `"series" \| "categories"` | — | What each step adds: one series, or one category, in data order. |
| `from` (required) | `number` | — | The step the first one comes in at, a whole number of 1 or more (step 0 is the slide before any step); each next one comes a step later. Series with their own `at` keep it. |

**`Annotation.callout`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `type` (required) | `"callout"` | — | Tells annotations apart. |
| `x` (required) | `string \| number` | — | The category (a point name, on a Scatter) it points at. |
| `label` (required) | `string` | — | The text, a few words: "Redesign ships". |
| `series` | `string` | — | The series whose point it marks; the highlighted or first series (on a Slope, the `to` field). |
| `y` | `number` | — | A value to point at instead of the series' value. |
| `at` | `number` | — | The step that reveals it. |

**`Annotation.reference`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `type` (required) | `"reference"` | — | Tells annotations apart. |
| `value` (required) | `number` | — | The value on the value axis. |
| `label` | `string` | — | The text at its end, such as "Target"; the formatted value is added after it. |
| `at` | `number` | — | The step that reveals it. |

**`Annotation.range`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `type` (required) | `"range"` | — | Tells annotations apart. |
| `from` (required) | `string \| number` | — | The first category of the span. |
| `to` (required) | `string \| number` | — | The last category of the span. |
| `label` | `string` | — | The text above the span. |
| `at` | `number` | — | The step that reveals it. |

**`Annotation.bracket`**

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `type` (required) | `"bracket"` | — | Tells annotations apart. |
| `from` (required) | `string \| number` | — | The category of the first point. |
| `to` (required) | `string \| number` | — | The category of the second point. |
| `series` | `string` | — | The series; the highlighted or first series. |
| `label` | `string` | — | The text; the change between the two values when left out. |
| `relative` | `boolean` | `true` | Write the change as a percentage of the first value, or in the unit. A change across zero (or from near zero) is always in the unit. |
| `better` | `"up" \| "down"` | `up` | Which way is good news, for the label's color. |
| `at` | `number` | — | The step that reveals it. |

Source: https://sandrinodm.github.io/deckster/reference/charts/index.mdx
