Skip to content
Calm motion: animations on this site only fade, with no movement

Small multiples ​

A grid of small line charts on one scale

Shows many series at a glance, one small chart for each, so that no lines cross. All the charts share one scale, so their heights compare. For a few series in one chart, use the line chart.

Basic

All charts share one scale: 0k to 100k

Weekly plays of each show
ItemW1W2W3W4W5W6W7W8W9W10W11W12
Morning Brief42k44k43k47k49k48k51k50k53k52k55k57k
Deep Dive38k36k37k35k34k36k33k34k32k33k31k30k
Weekend Chat21k22k25k24k28k31k29k33k35k34k38k41k
Tech Corner18k19k18k20k19k21k22k21k23k22k24k23k
Local News12k12k13k12k14k13k13k14k15k14k15k15k
Sport Talk9k14k8k16k10k18k9k17k11k19k10k20k
Book Club7k7k8k8k8k9k9k10k10k11k11k12k
Music Notes15k14k12k11k10k9k9k8k7k7k6k6k
  • series is a list of series. Each series has a label, a list of values, and an optional color.
  • Each cell shows the name, the last value, and a sparkline with the area under it. A line above the grid gives the shared scale, from zero or the lowest value to a round number over the highest.
  • steps names the steps for the table, such as the weeks. height sets the height of each small chart in pixels (default 56), and format sets the text of a value.
  • The cells fill the width in columns of about 10rem.
  • For screen readers, the grid is hidden and a table holds every value. label names the table. Change the words with labels or a label pack: item, and scale (a function of the two ends).

Usage ​

ts
import { BlessSmallMultiples } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
series*BlessMultiple[]—
stepsstring[]—the names of the steps, for the table; default: 1, 2, 3 …
heightnumber56the height of each small chart in pixels
format((v: number) => string)—
labelstring"Chart"names the chart and its table for screen readers
labelsPartial<{ item: string; scale: (lo: string, hi: string) => string; }>—

Released under the MIT License. Character names and artwork belong to their owners.