Skip to content
InsightCharts

Search

Search guides and components

Comparison brief

A compared with B on one page. It has a headline that states the result, the headline figures mirrored either side of their labels, one hero exhibit that shows both sides, paired exhibits on a shared scale, a verdict callout and a source note.

Use when
Use it for two things a reader has to choose between or compare, such as two countries, two products or a before and an after. Write the result with its number in the headline. Put the four or five most important measures in figures. Use a two-series line, dumbbell, slope or before and after as the hero. In each pair, use the same chart form and the same scale for both sides. The subject side takes the accent colour everywhere and the other side stays grey.
Avoid when
Three or more things (use a comparison table or small multiple grid inside a report page). One thing over time with nothing to compare it with (use timeline story). Paired charts on different scales, because readers compare bar lengths across the pair.

Preview

A template is a whole page, so the preview scrolls inside its frame. Expand it to read it in place, or open it full screen.

Full screen

Home heating

With the £7,500 grant, a heat pump repays its extra £500 cost in 4 years

After the grant a heat pump costs £3,500 to buy and fit. A gas boiler costs £3,000. The heat pump costs £855 a year to run. The boiler costs £980.

Heat pump

Air source, 7 kW

Measure
Gas boiler

Condensing combi, 30 kW

£3,500
Cost to buy and fit, after grant
£3,000
£855
Running cost per year
£980
0.6
CO2 per year, tonnes
2.3
3.2
Heat out per unit of energy in
0.9
20
Expected life, years
15

After 15 years the heat pump has cost £1,375 less than the boiler

Cumulative saving of a heat pump over a gas boiler in pounds, by years since installation. Includes purchase after the £7,500 grant, energy and servicing

Without the grant the heat pump costs £11,000 to buy and fit. That is £8,000 more than the boiler. A saving of £125 a year would take 64 years to repay it.

The January energy bill is £142 for the heat pump and £158 for the boiler

Estimated monthly energy cost for heating and hot water. Both charts use the same scale. The heat pump's bill is lower in all 12 months.

Heat pump

Gas boiler

Cost over 15 years by part

Energy is £12,075 of the heat pump's cost. It is £13,500 of the boiler's.

Heat pump

Gas boiler

Verdict
Choose the heat pump if you get the grant and will stay at least 5 years

Without the grant the boiler is cheaper. The figures assume electricity and gas prices stay at their Q4 2024 levels.

Sources
Energy regulator price cap, Q4 2024; Installer quotes collected by the author
Method
A house using 11,500 kWh of heat a year. Heat pump seasonal efficiency is 3.2. Boiler efficiency is 90%. Prices held flat in real terms.
Note
Illustrative data

Composition

Built from

The comparison brief template is assembled from 7 atoms. Any slot also takes any other component.

Atoms

7

Compares a value across categories with bars from a zero baseline.

A boxed statement of fact with a short bold lead and a sentence of explanation. The tone is marked by icon and tint.

The opening block of a piece or section: kicker, title, one-sentence deck and a byline/date line.

Shows how one or more values change over time or another ordered dimension.

A readable block of narration at a 45-75 character measure, for the text between charts.

Splits one whole into proportional segments along a single horizontal bar.

A sourcing footer for a whole piece: sources with optional links, the period covered, method, caveats and credit.

Installation

$ pnpm dlx shadcn@latest add @insightcharts/comparison-brief

The CLI copies the source into your project and needs the @insightcharts registry in components.json; see installation. With the package, import it by name:

import { ComparisonBrief } from "insightcharts";

Examples

Transport: a stacked hero, no pairs

London to Edinburgh

Flying from London to Edinburgh is 35 minutes faster than the train, door to door

The plane takes 275 minutes and the train 310. The flight itself lasts 80 minutes. The plane emits 140 kg of CO2 per passenger. The train emits 13 kg.

Train
Measure
Plane
310
Door to door, minutes
275
13
CO2 per passenger, kg
140
£78
Typical fare booked two weeks ahead
£92
240
Minutes you can spend working
50

80 of the plane's 275 minutes are spent in the air

Minutes per stage, city centre to city centre

Source: Timetables and airport guidance, weekday morning departures
Verdict
Take the train unless you need the 35 minutes

The train fare is £78 and the plane fare is £92. The train gives 240 minutes of working time. The plane gives 50.

Sources
Operator timetables; Government greenhouse gas conversion factors
Note
Illustrative fares and times

Props

PropTypeDefaultDescription
titlerequiredstringThe result of the comparison, as one plain sentence with the number in it.
kickerstringSmall label above the title.
deckstringOne-sentence standfirst.
bylinestringAuthor line.
datestringPublication date.
arequiredstring | { name, detail? }Side A, shown on the left.
brequiredstring | { name, detail? }Side B, shown on the right.
subject"a" | "b" | "none""a"The side the piece is about. It takes the accent colour; the other stays grey. Match it with highlight in the charts.
figures{ label, a, b, format?, better?: "higher" | "lower" }[]Headline measures. Numeric values get mirrored bars scaled within each row; better sets the stronger value bolder.
heroSlotThe exhibit that shows both sides at once. Default height 360px.
heroTextstringOne or two sentences under the hero.
pairs{ title, text?, a: Slot, b: Slot }[]Paired exhibits under one heading. A is on the left and B on the right; they stack in narrow containers. Use the same form and scale for both.
verdict{ lead?, body?, label?, tone? }The closing recommendation, shown as a callout.
sourcesstring | { name, url? } | (string | { name, url? })[]Where the data comes from, shown in the closing source note. Entries with a url are linked.
periodstringThe period the data covers.
methodstringHow the numbers were produced: definitions, adjustments, exclusions.
notestringCaveats the reader should know, e.g. "Illustrative data".
creditstringWho made the piece.
level1 | 2 | 3 | 4 | 5 | 61Heading level of the title; section headings follow one level down.
maxWidthnumber | stringWidest the piece may get. It is centred in wider containers.
themeThemeInputTheme override, passed on to everything inside.
mode"auto" | "system" | "light" | "dark""auto"Colour mode, passed on to everything inside.