Calm motion: animations on this site only fade, with no movement
Bump chart
The rank of each item over time, as lines that cross
Shows who is first, second, and third at each step, and when they change places. For the values and not the ranks, use the line chart. For one ranking now, use the leaderboard.
Basic
| Week | Morning Brief | Deep Dive | Weekend Chat | Tech Corner | Local News |
|---|---|---|---|---|---|
| W1 | #1 (52k) | #2 (41k) | #3 (38k) | #4 (22k) | #5 (18k) |
| W2 | #1 (49k) | #2 (44k) | #3 (31k) | #4 (29k) | #5 (17k) |
| W3 | #1 (47k) | #3 (39k) | #4 (28k) | #2 (41k) | #5 (21k) |
| W4 | #1 (50k) | #3 (36k) | #5 (24k) | #2 (46k) | #4 (26k) |
| W5 | #2 (44k) | #3 (38k) | #5 (27k) | #1 (51k) | #4 (30k) |
| W6 | #2 (42k) | #3 (40k) | #5 (33k) | #1 (48k) | #4 (35k) |
datais a list of steps in order, with a value for each series.xnames the field with the text of the step.seriestakes the same series as the line chart.- The chart ranks the series at each step. The highest value is rank 1, at the top. With
lower, the lowest value is rank 1, for example for a time. Equal values share a rank. - Each line ends with the name of its series. A hover on a line makes the other lines faint, so you can follow it through the crossings.
- If the chart is narrow, the labels under it skip some steps.
formatsets the text of a value in the table, andheightsets the height in pixels (default 260). - For screen readers, the chart is a table with the rank and the value of each series at each step.
labelnames the table. Change the words withlabelsor a label pack:step, andrank(a function of the rank and the value).
Usage
ts
import { BlessBumpChart } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
data* | BlessChartRow[] | — | one row for each step, in order, with a value for each series |
x* | string | — | the field of a row with the text of its step |
series* | BlessChartSeries[] | — | |
lower | boolean | — | a lower value ranks higher, for example a time |
height | number | 260 | |
format | ((v: number) => string) | — | |
label | string | "Chart" | names the chart and its table for screen readers |
labels | Partial<{ step: string; rank: (rank: number, value: string) => string; }> | — |