Skip to content

Highlights and annotations

Draw attention to one value in a chart with highlights and annotations.

A chart on a slide has a few seconds to make its point, so it should show the audience where to look. This page shows you how to keep one series, category or point in colour, add callouts, reference lines, ranges and brackets, keep the axis honest, and build the chart one step at a time while you talk. Choosing the form comes first: see Choosing a chart.

Highlight what matters

highlight names what the chart is about; everything else drops to the brand’s context colour. It takes:

  • a series name (highlight="2026"), or else a category (highlight="Billing and invoices"), or max, min, first or last;
  • several names as an array (highlight={['Billing', 'Payroll']});
  • a Highlight object, to say exactly what it is and from which step.

Highlight

FieldTypeDefaultDescription
seriesstring | string[]—Series to keep in color.
categorystring | 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).
atnumber—The step that turns the highlight on; the chart shows its own colors before it.

charts.json · types

<LineChart data={tickets} x="month" y="2026" highlight={{ range: ['Jun', 'Sep'] }} />

A chart that draws three or more series, or six or more categories, and highlights nothing gets chart-no-highlight from deck lint, checked on the slide’s last step; <BigNumber>, <Pictogram>, <Heatmap> and <Sparkline> are exempt. <Heatmap> and <Table> take their own highlight (a cell, row or column to outline or mark), and <Sparkline> takes last, max or min; the chart reference has each one.

Annotate the chart

annotations is a list of objects, each with a type:

  • callout: a short label pointing at one category, such as the month a change shipped;
  • reference: a line across the plot at a value, such as a target; the formatted value is added after its label;
  • range: a shaded span of categories, such as a rollout;
  • bracket: the change between two points of one series, written for you when you leave out label.

This <AreaChart> uses three of them:

data-stories / response-timeOpen full deck
decks/data-stories/slides/response-time.mdxmdx
---
layout: chart
title: First replies have beaten the 4-hour target every week since week 29
eyebrow: Speed
surface: gradient
budget: 1m
---

<AreaChart
  data={[
    { week: 'W21', hours: 9.5 }, { week: 'W22', hours: 9.1 }, { week: 'W23', hours: 8.8 },
    { week: 'W24', hours: 9.0 }, { week: 'W25', hours: 7.2 }, { week: 'W26', hours: 5.8 },
    { week: 'W27', hours: 4.9 }, { week: 'W28', hours: 4.2 }, { week: 'W29', hours: 3.9 },
    { week: 'W30', hours: 3.6 }, { week: 'W31', hours: 3.5 }, { week: 'W32', hours: 3.1 },
    { week: 'W33', hours: 2.9 }, { week: 'W34', hours: 3.4 }, { week: 'W35', hours: 3.8 },
    { week: 'W36', hours: 3.2 }, { week: 'W37', hours: 2.8 }, { week: 'W38', hours: 2.7 },
    { week: 'W39', hours: 2.6 }, { week: 'W40', hours: 2.5 },
  ]}
  x="week"
  y="hours"
  unit="h"
  annotations={[
    { type: 'range', from: 'W25', to: 'W27', label: 'Rollout' },
    { type: 'reference', value: 4, label: 'Target' },
    { type: 'callout', x: 'W35', label: 'Back-to-school peak, still under target' },
  ]}
  caption="Median time to first reply, hours, weeks 21 to 40 of 2026"
/>

<Notes>
The shaded weeks are the rollout. From week 29 on, every week is under the line.

The bump in week 35 is the September peak, our busiest week of the year, and it still held.
</Notes>

Slide 12 of the data-stories deckView on GitHub

<BarChart>, <LineChart>, <AreaChart> and <Waterfall> take all four; <Slope> and <Scatter> take only callouts and reference lines, and a range or a bracket throws there. The fields of each type:

Annotation.callout

FieldTypeDefaultDescription
typerequired"callout"—Tells annotations apart.
xrequiredstring | number—The category (a point name, on a Scatter) it points at.
labelrequiredstring—The text, a few words: "Redesign ships".
seriesstring—The series whose point it marks; the highlighted or first series (on a Slope, the to field).
ynumber—A value to point at instead of the series' value.
atnumber—The step that reveals it.

charts.json · types

Annotation.reference

FieldTypeDefaultDescription
typerequired"reference"—Tells annotations apart.
valuerequirednumber—The value on the value axis.
labelstring—The text at its end, such as "Target"; the formatted value is added after it.
atnumber—The step that reveals it.

charts.json · types

Annotation.range

FieldTypeDefaultDescription
typerequired"range"—Tells annotations apart.
fromrequiredstring | number—The first category of the span.
torequiredstring | number—The last category of the span.
labelstring—The text above the span.
atnumber—The step that reveals it.

charts.json · types

Annotation.bracket

FieldTypeDefaultDescription
typerequired"bracket"—Tells annotations apart.
fromrequiredstring | number—The category of the first point.
torequiredstring | number—The category of the second point.
seriesstring—The series; the highlighted or first series.
labelstring—The text; the change between the two values when left out.
relativebooleantrueWrite 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"upWhich way is good news, for the label's color.
atnumber—The step that reveals it.

charts.json · types

Labels or a legend

Charts label the marks themselves: line ends, bar tips, slices. On <BarChart>, <LineChart> and <AreaChart>, labels chooses which values are written: auto (the default) labels every value when there are few enough to read, and drops the value axis, else only the highlighted ones; all, highlight, ends and none do what they say. A legend appears only where direct labels cannot name the series, as on grouped and stacked bars; legend forces it on or off. When a legend shows where direct labels would do, deck lint warns with chart-legend-avoidable.

Keep the axis honest

Bars and areas start at zero. A <BarChart> with min above zero is an error unless you also set truncate, which draws an axis break across every bar, the value axis and an “Axis starts at” note:

$ deck lint launch-review
decks/launch-review/slides/truncated.mdx
  error   chart-truncated-axis (truncated): <BarChart> sets `min` above zero; bars start at zero, so the chart draws from zero.
          Fix: In decks/launch-review/slides/truncated.mdx, remove `min`, or show the values with a <LineChart> or dots, which may zoom. Add `truncate` only if the cut is essential: the chart then draws an axis break.

launch-review: 1 error, 0 warnings in 2 slides (2 steps checked).

A <LineChart> may zoom: its axis hugs the data and says where it starts. Set zero to start it at zero, as both slides below do.

Build the chart step by step

A chart builds with at, the step that reveals something, from step 1 (step 0 is the slide before any step). at goes on:

  • the chart itself, to reveal the whole figure;
  • a series in y, written as { field: '2026', at: 1 };
  • the highlight object;
  • each annotation.

This <LineChart> shows last year first, this year on step 1, a callout on step 2 and a bracket on step 3:

  1. Review rounds fell from five to two after Halden moved its decks to code, step 0 (of steps 0 to 3).0start
  2. Review rounds fell from five to two after Halden moved its decks to code, step 1 (of steps 0 to 3).1
  3. Review rounds fell from five to two after Halden moved its decks to code, step 2 (of steps 0 to 3).2
  4. Review rounds fell from five to two after Halden moved its decks to code, step 3 (of steps 0 to 3).3finished
showcase / review-rounds4 steps; select one to open the deck at that step in a new tab
y={['2025', { field: '2026', at: 1 }]}
highlight="2026"
annotations={[
  { type: 'callout', x: 'Apr', label: 'Decks move to code', at: 2 },
  { type: 'bracket', from: 'Apr', to: 'Sep', better: 'down', at: 3 },
]}

The same pattern on another slide; the bracket has no label, so it writes the change from June to October itself, −38%:

  1. Tickets fell 38% in the four months after the June redesign, step 0 (of steps 0 to 3).0start
  2. Tickets fell 38% in the four months after the June redesign, step 1 (of steps 0 to 3).1
  3. Tickets fell 38% in the four months after the June redesign, step 2 (of steps 0 to 3).2
  4. Tickets fell 38% in the four months after the June redesign, step 3 (of steps 0 to 3).3finished
data-stories / redesign-effect4 steps; select one to open the deck at that step in a new tab

reveal builds the marks for you, one series or one category per step: reveal="series" or reveal="categories" starts at step 1, and the object form starts later. <BarChart>, <LineChart>, <AreaChart>, <Waterfall> and <Funnel> take it; on a <Waterfall> the totals show from the start and the changes between them build.

RevealOption

FieldTypeDefaultDescription
byrequired"series" | "categories"—What each step adds: one series, or one category, in data order.
fromrequirednumber—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.

charts.json · types

<BarChart
  data={[
    { reason: 'Billing', share: 33 },
    { reason: 'Login', share: 17 },
    { reason: 'Integrations', share: 13 },
    { reason: 'Export', share: 9 },
  ]}
  x="reason"
  y="share"
  unit="%"
  reveal={{ by: 'categories', from: 1 }}
  highlight={{ category: 'Billing', at: 5 }}
  annotations={[{ type: 'reference', value: 30, label: 'Two next together', at: 5 }]}
  caption="Share of tickets by first-contact reason, 2026"
/>

Here the four bars arrive on steps 1 to 4, and on step 5 Billing keeps its colour while the others go grey, under a reference line at 30%. The last step is the complete chart, which static mode, deck shot and every export show. Write a [click] cue in the speaker notes for each step, so the talk and the build stay in order; Builds covers steps across a slide.

What lint checks

deck lint renders every step and reports these chart rules (lint rules has them all):

Rule Severity Reports
chart-empty error A chart draws no marks, or a line or area chart has a single point.
chart-truncated-axis error A bar chart sets min above zero without truncate.
chart-no-highlight warning A chart with several series or many categories highlights nothing.
chart-too-many-series warning More series in their own colour than the brand’s categorical palette has colours.
chart-too-many-categories warning More bars, stages, rows or items than read at a glance, from each chart’s limits.
chart-missing-unit warning Values with no unit and no caption naming the measure.
chart-legend-avoidable warning A legend where direct labels would name the series.
chart-funnel-grows warning A <Funnel> stage holds more than the stage before it.

Type to search…

↑↓ navigate↵ selectEsc close