Ranking and change
Slope, bump and range charts for who moved and by how much, as copyable recipes.
Recipes for the FT Visual Vocabulary “ranking” family: slope charts, bump charts, and range (dumbbell/arrow) charts. All three answer the same editorial question, “who moved, and by how much?”, with different emphasis.
Slope and bump are not separate chart types. They are mark: "line" plus a handful of public spec fields, documented here as copy-paste recipes. Range is its own mark (mark: "range").
All specs work with any framework. Swap the import to match yours:
// React
import { Chart } from "@opendata-ai/openchart-react";
<Chart spec={spec} />
// Vue
import { Chart } from "@opendata-ai/openchart-vue";
<Chart :spec="spec" />
// Svelte
import { Chart } from "@opendata-ai/openchart-svelte";
<Chart {spec} />
// Vanilla JS
import { createChart } from "@opendata-ai/openchart-vanilla";
createChart(container, spec);Slope
Two points in time, one line per series. The strongest form for “before vs after”: every crossing line is a rank change, every steep line is a big move. Values live on the labels, so the y axis and gridlines go away entirely.
The rows are the source table’s 2010 and 2024 columns, reshaped to one row per source and year.
What each field does:
endpointLabels.ends: 'both'puts a label column at both edges (plain endpoint labels are trailing-edge only).endpointLabels.content: 'label value'joins the series name and its formatted value on one line (“Coal 44.8”). The classic FT look, name plus value on the left and value alone on the right, iscontent: { leading: 'label value', trailing: 'value' }.axis: falseon y removes the axis and its gridlines. The labels carry the values, so an axis would be redundant ink.scale: { zero: false }lets the two rails span the data range instead of anchoring at zero, which is what makes the slopes readable.legend: { show: false }because the labels already identify every series.
Because the spec sets endpointLabels explicitly, the label columns survive the compact (under 400px) breakpoint, where auto endpoint labels would normally hand off to a legend. A slope without its labels is unreadable, so explicit opt-in wins.
Bump
Rank over time. The y axis is the finishing position, reversed so 1st sits at the top, with ordinal tick labels (“1st, 2nd, 3rd”). Point markers anchor each step; monotone interpolation keeps the lines readable through crossings. Ties are fine: two series with the same rank share the same row.
const spec = {
mark: { type: 'line', interpolate: 'monotone', point: true },
data: [
{ season: '2019', team: 'Mercedes', position: 1 },
{ season: '2020', team: 'Mercedes', position: 1 },
{ season: '2021', team: 'Mercedes', position: 1 },
{ season: '2022', team: 'Mercedes', position: 3 },
{ season: '2023', team: 'Mercedes', position: 2 },
{ season: '2024', team: 'Mercedes', position: 4 },
{ season: '2019', team: 'Red Bull', position: 3 },
{ season: '2020', team: 'Red Bull', position: 2 },
{ season: '2021', team: 'Red Bull', position: 2 },
{ season: '2022', team: 'Red Bull', position: 1 },
{ season: '2023', team: 'Red Bull', position: 1 },
{ season: '2024', team: 'Red Bull', position: 3 },
{ season: '2019', team: 'Ferrari', position: 2 },
{ season: '2020', team: 'Ferrari', position: 6 },
{ season: '2021', team: 'Ferrari', position: 3 },
{ season: '2022', team: 'Ferrari', position: 2 },
{ season: '2023', team: 'Ferrari', position: 3 },
{ season: '2024', team: 'Ferrari', position: 2 },
{ season: '2019', team: 'McLaren', position: 4 },
{ season: '2020', team: 'McLaren', position: 3 },
{ season: '2021', team: 'McLaren', position: 4 },
{ season: '2022', team: 'McLaren', position: 5 },
{ season: '2023', team: 'McLaren', position: 4 },
{ season: '2024', team: 'McLaren', position: 1 },
{ season: '2019', team: 'Alpine', position: 5 },
{ season: '2020', team: 'Alpine', position: 5 },
{ season: '2021', team: 'Alpine', position: 5 },
{ season: '2022', team: 'Alpine', position: 4 },
{ season: '2023', team: 'Alpine', position: 6 },
{ season: '2024', team: 'Alpine', position: 6 },
],
encoding: {
x: { field: 'season', type: 'ordinal' },
y: {
field: 'position',
type: 'quantitative',
scale: { reverse: true, zero: false },
axis: { values: [1, 2, 3, 4, 5, 6], format: 'ordinal' },
},
color: { field: 'team', type: 'nominal' },
},
endpointLabels: {
ends: 'both',
content: 'label',
showMarker: false,
},
legend: { show: false },
chrome: {
title: 'McLaren Went From Midfield to Champions',
subtitle: 'Formula 1 constructors championship, final position by season',
source: 'Source: FIA official standings',
},
};What each field does:
scale: { reverse: true }flips the y range so rank 1 renders at the top.zero: falsekeeps rank 0 off the axis.axis: { values: [1, 2, 3, 4, 5, 6], format: 'ordinal' }pins one tick per rank and formats them as ordinals.format: 'ordinal'is an OpenChart extension to the d3-format strings; it works anywhere a format string does.interpolate: 'monotone'curves the lines through rank changes without overshooting;point: truemarks every step.endpointLabels.content: 'label'puts the name alone at both ends (the rank is already on the axis).showMarker: falseskips the open-circle end markers, which would double up with the step points.
If your data has raw scores instead of precomputed ranks, derive the rank with the window transform first:
transform: [
{
window: [{ op: 'rank', field: 'points', as: 'position' }],
sort: [{ field: 'points', order: 'descending' }],
groupby: ['season'],
},
],Live example: Bump
Range (dumbbell)
When the story is the size of the change per category rather than trajectories over time, use mark: "range": one row per category, a dot at the start and end values. Set mark: { type: 'range', style: 'arrow' } for an arrowhead at the end value, or style: 'bar' for a plain floating bar.
Live examples: Dumbbell | Arrow | Range bar
Picking within the family
| You want to show | Use |
|---|---|
| Before vs after for many series, values matter | Slope |
| Rank trajectories across several periods | Bump |
| Size of change per category, one period pair | Range (dumbbell or arrow) |
| Continuous values over many periods | Plain multi-series line |
Related docs
- Chart types for the full gallery of supported forms
- Spec reference for field-by-field type details, including
endpointLabelsand scale options - Visualization patterns for more data storytelling recipes
Grouped bar lists and uncertainty
Bar lists support encoding.group for section headers, sort: null to retain input order, an explicit encoding.value.scale.domain for comparisons, and x reference lines such as a lift baseline at 1. labels.format, prefix and suffix control the displayed row value. Bar and range marks separately support labels.content to compose names and values. For estimates with uncertainty, layer an errorbar with a point instead of encoding the interval as a filled bar. Supply all interval bounds upstream. See static rendering for server output.