---
title: "Choosing a chart"
description: "Pick the chart that fits the point a slide makes."
---

> 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.

# Choosing a chart

A chart slide makes one point, and the chart is the evidence for it. This page shows you how to pick the form from the point you are making, feed it rows inline, from a CSV or JSON file or from the slide's frontmatter, write a title `deck lint` accepts, and choose the layout it sits in. Every prop is on [the chart reference](https://sandrinodm.github.io/deckster/reference/charts/).

## Start from the message

Name what the numbers say before you pick a form. The kit has 19 chart and number components, and each is filed under the messages it can carry:

| Message | Components |
| --- | --- |
| single number | `<BigNumber>`, `<StatRow>`, `<Pictogram>`, `<Progress>` |
| comparison | `<StatRow>`, `<Comparison>`, `<BarChart>`, `<Slope>`, `<Waterfall>`, `<Heatmap>`, `<Table>`, `<RetentionCohorts>`, `<ProfitPool>` |
| ranking | `<BarChart>`, `<ProfitPool>` |
| trend | `<BarChart>`, `<LineChart>`, `<AreaChart>`, `<Sparkline>`, `<RetentionCohorts>`, `<MarketMovement>` |
| change between two points | `<Comparison>`, `<Slope>`, `<MarketMovement>` |
| part-to-whole | `<AreaChart>`, `<Donut>`, `<Pictogram>`, `<Progress>`, `<ProfitPool>` |
| distribution | `<Scatter>`, `<Heatmap>` |
| correlation | `<Scatter>`, `<MarketMovement>` |
| flow | `<Waterfall>`, `<Funnel>` |
| exact values | `<Table>` |

`deck charts` prints every component with its messages, when to use and avoid it, the shape of its data, how it draws a missing value and an example; `deck charts --json` adds this table as `messages`, with the props and limits, for an agent.

- [`<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.

When one number is the message, read [Number components](https://sandrinodm.github.io/deckster/data-and-diagrams/number-components/) instead.

## Know when a form is wrong

A form that fits the data can still hide the point. These two slides show the same hours per team: grouped bars make the audience compare fourteen bars in pairs, while the slope draws the change, so the two teams that got slower stand out.

*Slide still: Grouped bars of median hours to resolve a ticket for seven teams in 2025 and 2026. Five pairs are muted and two are highlighted in green and terracotta. Payroll rises from 12 to 15 hours and Billing from 18 to 22.* [Open the slide](https://sandrinodm.github.io/deckster/decks/data-stories/#/wrong-chart)

*Slide still: A slope chart of the same seven teams from 2025 to 2026. Two terracotta lines rise from 18 to 22 hours for Billing and 12 to 15 for Payroll. The five muted lines fall.* [Open the slide](https://sandrinodm.github.io/deckster/decks/data-stories/#/right-chart)

Each entry on [the chart reference](https://sandrinodm.github.io/deckster/reference/charts/) has an Avoid line, the same one `deck charts` prints, that names the misuse or the form to use instead: the [`<Donut>`](https://sandrinodm.github.io/deckster/reference/charts/#props-Donut) entry, for example, says to use sorted bars for more than five slices or close values.

`deck lint` holds each chart to the numbers in its `limits`: a `<BarChart>` past 12 categories or a `<Slope>` past 10 gets `chart-too-many-categories`, and a `<Donut>` with more than 5 slices gets `chart-pie-slices`. [Lint rules](https://sandrinodm.github.io/deckster/reference/lint-rules/#charts) lists every `chart-*` rule.

## Give the chart data

A chart takes its rows in one of three ways.

Inline, as an array of objects: `data={[{ month: 'Jan', '2025': 5.1 }, ...]}`.

From a CSV or JSON file in the deck folder, imported by a path relative to the slide. A CSV is parsed into rows at build time: the header line names the fields, numbers become numbers and empty cells become `null`. A malformed file fails the build with its path and line.

```csv title="decks/launch-review/data/signups.csv"
channel,signups
Search,4200
Referral,2600
Social,1900
Email,
Events,700
```

```mdx title="decks/launch-review/slides/signups.mdx"
import signups from '../data/signups.csv';

<BarChart data={signups} x="channel" y="signups" sort highlight="Search" caption="Signups in October 2026" />
```

This slide's title, "Signups by channel", is the one `deck lint` flags below.

Or from a named dataset in the slide's `data:` frontmatter, which a chart names with `data="reasons"`:

[Live slide: "Billing questions are a third of everything customers ask us", slide 5 of the data-stories deck](https://sandrinodm.github.io/deckster/decks/data-stories/#/top-reasons)

`decks/data-stories/slides/top-reasons.mdx`:

```mdx
---
layout: chart
title: Billing questions are a third of everything customers ask us
eyebrow: Why customers write in
surface: inverse
budget: 1m
data:
  reasons:
    - { reason: Billing and invoices, share: 33 }
    - { reason: Login and access, share: 17 }
    - { reason: Integrations, share: 13 }
    - { reason: Data export, share: 9 }
    - { reason: Performance, share: 8 }
    - { reason: Other, share: 20 }
---

<BarChart
  data="reasons"
  x="reason"
  y="share"
  unit="%"
  sort
  highlight="Billing and invoices"
  caption="Share of tickets by first-contact reason, January to October 2026"
/>

<Footnote>Source: Lumen helpdesk export, 55,500 tickets. Reasons as tagged by agents.</Footnote>

<Notes>
Point at billing first: a third of all tickets, 18,420 of 55,500. It is bigger than the next two reasons together.
</Notes>
```

When `x` or `y` is left out, a chart picks fields for itself (for a `<BarChart>`, the first text field and every number field), so name them. Two rows for the same category (and series) throw an error.

Each chart draws a missing value (`null`, an empty CSV cell, text that is not a number) in its own way, listed as "Missing values" in `deck charts`. The `Email` row above has no count: the `<BarChart>` draws no bar and no label there and keeps the category in its place. A `<LineChart>` breaks the line, a `<Scatter>` leaves the point out, and a `<Slope>` throws an error naming the item.

A prop name a chart does not take throws, naming the closest one. `deck lint` reports it as a `render-error`:

```console
$ deck lint launch-review
...
  error   render-error (typo step 0): The slide shows an error instead of its content: `value` is not a prop of BarChart; did you mean `y`? Its props are: at, caption, source, label, data, highlight, annotations, format, unit, labels, legend, x, y, series, orientation, stacked, sort, min, max, truncate, reveal. `deck charts --json` describes each one.
...
```

(Cut to the one finding.)

## Write the title as the takeaway

The slide title states what the chart shows, as a sentence with the number when there is one: "Billing questions are a third of everything customers ask us". The measure, unit and period go in the chart's `caption`, and the source in `source` or a `<Footnote>`. A title that reads like a topic gets a warning:

```console
$ deck lint launch-review
decks/launch-review/slides/signups.mdx
  warning chart-topic-title (signups): "Signups by channel" looks like a topic, not a takeaway (a heuristic: it reads as "X by Y").
          Fix: State what the chart shows in the title of decks/launch-review/slides/signups.mdx, with the number when there is one: "Billing tickets doubled in Q3", not "Tickets by queue". Put the measure and period in the chart's `caption`.

launch-review: 0 errors, 1 warning in 2 slides (2 steps checked).
```

Then make the chart point at the same thing the title says, with a `highlight`: see [Highlights and annotations](https://sandrinodm.github.io/deckster/data-and-diagrams/highlights-and-annotations/).

## Choose the layout

- **`chart`**: the default. One chart, number component or table fills the space under the title; `<Aside>` sets the "so what" beside it and `<Footnote>` the source.
- **`split`**: text on one side and the chart in `<Media>` on the other, when the chart needs a paragraph or a few bullets.
- **`table`**: one Markdown table or `<Table>` of exact values, about eight rows and five columns, when the audience will read the numbers rather than the shape.
- **`stats`**: two to four plain figures in a row, with no chart at all.

Each layout and its limits are on its own page under [layouts](https://sandrinodm.github.io/deckster/reference/layouts/).

Twelve of the 19 components have a native PowerPoint counterpart, which `deck charts --json` names in each chart's `native` field (`null` for `<BigNumber>`, `<StatRow>`, `<Pictogram>`, `<Heatmap>`, `<RetentionCohorts>`, `<ProfitPool>` and `<MarketMovement>`). [PowerPoint](https://sandrinodm.github.io/deckster/export-and-publish/powerpoint/) explains when an export uses it.

Source: https://sandrinodm.github.io/deckster/data-and-diagrams/choosing-a-chart/index.mdx
