Bump chart

Use it when order matters more than size, such as which themes lead the conversation each week. Lines cross where the order changes, so the story of who is climbing and who is falling reads at once. Hover or focus a line to isolate it.

← All charts

Live demo

Made-up data. Try the options, then switch to the empty and one-point states.

Tab into the chart once, then use the arrow keys (or Home and End) to move from item to item; Esc closes the tooltip. On a phone, touch an item.

How to use it

Paste the toolkit from Get the code into your page first, then call the chart like this.

JavaScript
const ranked = rankSeries([
  { name: 'Renewals',   colour: catColor('Renewals'),   values: renewalsPerWeek },
  { name: 'Payments',   colour: catColor('Payments'),   values: paymentsPerWeek },
  { name: 'Certificates', colour: catColor('Certificates'), values: certificatesPerWeek }
]);
const chart = bump({
  xs: weeks,
  xlabel: (w, i, isTooltip) => fmtDate(w),
  series: ranked,                    // each has ranks: [3, 2, 2, 1, ...]
  tipfmt: v => v + ' conversations',
  label: 'Rank of themes by weekly conversations'
});
document.querySelector('#host').append(chart);

Options

What you can pass to this chart.

xs

Array of x values (strings), usually periods.

series

[{ name, ranks, values?, colour }]. ranks[i] is 1 for the top; null means not ranked that period. Use rankSeries() to build ranks from values.

xlabel

(x, i, isTooltip) => string.

tipfmt

Formatter for the values shown beside each rank in the tooltip.

rowH

Height of one rank row in pixels (default 28).

label / empty

aria-label for screen readers; text shown when there is no data.

Want charts or dashboards like these in your own product?

Tell me what you are trying to see and I can help work out the right approach, from the data behind it to the screen in front of people.