A long article read by scrolling. It has a headline, then an ordered list of blocks in a reading column, then a source note. The blocks are prose, figures, charts with a callout, scrolly sequences, pull quotes, stat rows, small multiples and chapter breaks. Exhibits can be wider than the column.
Small multiples
Repeats one small line, area or bar chart per value of a facet field on a shared scale, each panel titled.
- Use when
- The same measure for 4 to about 24 entities when one chart would have too many overlapping lines; pair with
highlightto pick out one panel, orcontextto show every other line faintly behind each. - Avoid when
- Three or fewer series (use line chart with direct labels); when exact comparison between two entities matters most (use line chart with
highlight); a single value per entity (use bar chart).
Preview
Greek unemployment fell from 27.5% in 2013 to 10.1% in 2024
Unemployment rate, 2010 to 2024, same scale in every panel
import { SmallMultiples } from "insightcharts";
const data = [
{ country: "Germany", year: "2010", rate: 6.8 },
{ country: "Germany", year: "2013", rate: 5 },
{ country: "Germany", year: "2015", rate: 4.6 },
{ country: "Germany", year: "2017", rate: 3.8 },
{ country: "Germany", year: "2019", rate: 3.1 },
{ country: "Germany", year: "2021", rate: 3.6 },
{ country: "Germany", year: "2023", rate: 3 },
{ country: "Germany", year: "2024", rate: 3.4 },
{ country: "Spain", year: "2010", rate: 19.9 },
{ country: "Spain", year: "2013", rate: 26.1 },
{ country: "Spain", year: "2015", rate: 22.1 },
{ country: "Spain", year: "2017", rate: 17.2 },
{ country: "Spain", year: "2019", rate: 14.1 },
{ country: "Spain", year: "2021", rate: 14.8 },
{ country: "Spain", year: "2023", rate: 12.2 },
{ country: "Spain", year: "2024", rate: 11.4 },
{ country: "Italy", year: "2010", rate: 8.4 },
{ country: "Italy", year: "2013", rate: 12.1 },
{ country: "Italy", year: "2015", rate: 11.9 },
{ country: "Italy", year: "2017", rate: 11.2 },
{ country: "Italy", year: "2019", rate: 9.9 },
{ country: "Italy", year: "2021", rate: 9.5 },
{ country: "Italy", year: "2023", rate: 7.7 },
{ country: "Italy", year: "2024", rate: 6.5 },
{ country: "France", year: "2010", rate: 9.3 },
{ country: "France", year: "2013", rate: 10.3 },
{ country: "France", year: "2015", rate: 10.4 },
{ country: "France", year: "2017", rate: 9.4 },
{ country: "France", year: "2019", rate: 8.4 },
{ country: "France", year: "2021", rate: 7.9 },
{ country: "France", year: "2023", rate: 7.3 },
{ country: "France", year: "2024", rate: 7.4 },
{ country: "Greece", year: "2010", rate: 12.7 },
{ country: "Greece", year: "2013", rate: 27.5 },
{ country: "Greece", year: "2015", rate: 24.9 },
{ country: "Greece", year: "2017", rate: 21.5 },
{ country: "Greece", year: "2019", rate: 17.3 },
{ country: "Greece", year: "2021", rate: 14.7 },
{ country: "Greece", year: "2023", rate: 11.1 },
{ country: "Greece", year: "2024", rate: 10.1 },
{ country: "Poland", year: "2010", rate: 9.7 },
{ country: "Poland", year: "2013", rate: 10.3 },
{ country: "Poland", year: "2015", rate: 7.5 },
{ country: "Poland", year: "2017", rate: 4.9 },
{ country: "Poland", year: "2019", rate: 3.3 },
{ country: "Poland", year: "2021", rate: 3.4 },
{ country: "Poland", year: "2023", rate: 2.8 },
{ country: "Poland", year: "2024", rate: 2.9 },
];
export function Example() {
return (
<SmallMultiples
data={data}
facet="country"
x="year"
y="rate"
highlight="Greece"
format={"{value}%"}
title="Greek unemployment fell from 27.5% in 2013 to 10.1% in 2024"
subtitle="Unemployment rate, 2010 to 2024, same scale in every panel"
source="Eurostat (rounded)"
note="Figures are approximate, for illustration"
/>
);
}{
"type": "small-multiples",
"data": [
{ "country": "Germany", "year": "2010", "rate": 6.8 },
{ "country": "Germany", "year": "2013", "rate": 5 },
{ "country": "Germany", "year": "2015", "rate": 4.6 },
{ "country": "Germany", "year": "2017", "rate": 3.8 },
{ "country": "Germany", "year": "2019", "rate": 3.1 },
{ "country": "Germany", "year": "2021", "rate": 3.6 },
{ "country": "Germany", "year": "2023", "rate": 3 },
{ "country": "Germany", "year": "2024", "rate": 3.4 },
{ "country": "Spain", "year": "2010", "rate": 19.9 },
{ "country": "Spain", "year": "2013", "rate": 26.1 },
{ "country": "Spain", "year": "2015", "rate": 22.1 },
{ "country": "Spain", "year": "2017", "rate": 17.2 },
{ "country": "Spain", "year": "2019", "rate": 14.1 },
{ "country": "Spain", "year": "2021", "rate": 14.8 },
{ "country": "Spain", "year": "2023", "rate": 12.2 },
{ "country": "Spain", "year": "2024", "rate": 11.4 },
{ "country": "Italy", "year": "2010", "rate": 8.4 },
{ "country": "Italy", "year": "2013", "rate": 12.1 },
{ "country": "Italy", "year": "2015", "rate": 11.9 },
{ "country": "Italy", "year": "2017", "rate": 11.2 },
{ "country": "Italy", "year": "2019", "rate": 9.9 },
{ "country": "Italy", "year": "2021", "rate": 9.5 },
{ "country": "Italy", "year": "2023", "rate": 7.7 },
{ "country": "Italy", "year": "2024", "rate": 6.5 },
{ "country": "France", "year": "2010", "rate": 9.3 },
{ "country": "France", "year": "2013", "rate": 10.3 },
{ "country": "France", "year": "2015", "rate": 10.4 },
{ "country": "France", "year": "2017", "rate": 9.4 },
{ "country": "France", "year": "2019", "rate": 8.4 },
{ "country": "France", "year": "2021", "rate": 7.9 },
{ "country": "France", "year": "2023", "rate": 7.3 },
{ "country": "France", "year": "2024", "rate": 7.4 },
{ "country": "Greece", "year": "2010", "rate": 12.7 },
{ "country": "Greece", "year": "2013", "rate": 27.5 },
{ "country": "Greece", "year": "2015", "rate": 24.9 },
{ "country": "Greece", "year": "2017", "rate": 21.5 },
{ "country": "Greece", "year": "2019", "rate": 17.3 },
{ "country": "Greece", "year": "2021", "rate": 14.7 },
{ "country": "Greece", "year": "2023", "rate": 11.1 },
{ "country": "Greece", "year": "2024", "rate": 10.1 },
{ "country": "Poland", "year": "2010", "rate": 9.7 },
{ "country": "Poland", "year": "2013", "rate": 10.3 },
{ "country": "Poland", "year": "2015", "rate": 7.5 },
{ "country": "Poland", "year": "2017", "rate": 4.9 },
{ "country": "Poland", "year": "2019", "rate": 3.3 },
{ "country": "Poland", "year": "2021", "rate": 3.4 },
{ "country": "Poland", "year": "2023", "rate": 2.8 },
{ "country": "Poland", "year": "2024", "rate": 2.9 }
],
"facet": "country",
"x": "year",
"y": "rate",
"highlight": "Greece",
"format": "{value}%",
"title": "Greek unemployment fell from 27.5% in 2013 to 10.1% in 2024",
"subtitle": "Unemployment rate, 2010 to 2024, same scale in every panel",
"source": "Eurostat (rounded)",
"note": "Figures are approximate, for illustration"
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Composition
Used in
1 template uses small multiples.
Templates
1Installation
$ pnpm dlx shadcn@latest add @insightcharts/small-multiplesThe 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 { SmallMultiples } from "insightcharts";Examples
Every other line as context
Chicago's average monthly temperature ranges from -3.2°C to 24.3°C
Average monthly temperature, °C. Honolulu ranges from 23.0 to 27.9. Grey lines show the other cities.
import { SmallMultiples } from "insightcharts";
const data = [
{ city: "Phoenix", month: "Jan", temp: 12.4 },
{ city: "Phoenix", month: "Feb", temp: 14.1 },
{ city: "Phoenix", month: "Mar", temp: 17.6 },
{ city: "Phoenix", month: "Apr", temp: 22.8 },
{ city: "Phoenix", month: "May", temp: 27.9 },
{ city: "Phoenix", month: "Jun", temp: 31.2 },
{ city: "Phoenix", month: "Jul", temp: 33 },
{ city: "Phoenix", month: "Aug", temp: 31.8 },
{ city: "Phoenix", month: "Sep", temp: 28.1 },
{ city: "Phoenix", month: "Oct", temp: 21.7 },
{ city: "Phoenix", month: "Nov", temp: 15.6 },
{ city: "Phoenix", month: "Dec", temp: 12.1 },
{ city: "Seattle", month: "Jan", temp: 5.6 },
{ city: "Seattle", month: "Feb", temp: 6.8 },
{ city: "Seattle", month: "Mar", temp: 8.6 },
{ city: "Seattle", month: "Apr", temp: 10.9 },
{ city: "Seattle", month: "May", temp: 14.2 },
{ city: "Seattle", month: "Jun", temp: 16.9 },
{ city: "Seattle", month: "Jul", temp: 19.6 },
{ city: "Seattle", month: "Aug", temp: 19.8 },
{ city: "Seattle", month: "Sep", temp: 17.1 },
{ city: "Seattle", month: "Oct", temp: 12.3 },
{ city: "Seattle", month: "Nov", temp: 8.1 },
{ city: "Seattle", month: "Dec", temp: 5.6 },
{ city: "Chicago", month: "Jan", temp: -3.2 },
{ city: "Chicago", month: "Feb", temp: -1.2 },
{ city: "Chicago", month: "Mar", temp: 4.4 },
{ city: "Chicago", month: "Apr", temp: 10.5 },
{ city: "Chicago", month: "May", temp: 16.1 },
{ city: "Chicago", month: "Jun", temp: 21.7 },
{ city: "Chicago", month: "Jul", temp: 24.3 },
{ city: "Chicago", month: "Aug", temp: 23.4 },
{ city: "Chicago", month: "Sep", temp: 19.1 },
{ city: "Chicago", month: "Oct", temp: 12.1 },
{ city: "Chicago", month: "Nov", temp: 5.4 },
{ city: "Chicago", month: "Dec", temp: -1 },
{ city: "Miami", month: "Jan", temp: 20.1 },
{ city: "Miami", month: "Feb", temp: 21.2 },
{ city: "Miami", month: "Mar", temp: 22.6 },
{ city: "Miami", month: "Apr", temp: 24.4 },
{ city: "Miami", month: "May", temp: 26.6 },
{ city: "Miami", month: "Jun", temp: 28.1 },
{ city: "Miami", month: "Jul", temp: 28.8 },
{ city: "Miami", month: "Aug", temp: 28.9 },
{ city: "Miami", month: "Sep", temp: 28.2 },
{ city: "Miami", month: "Oct", temp: 26.3 },
{ city: "Miami", month: "Nov", temp: 23.5 },
{ city: "Miami", month: "Dec", temp: 21.3 },
{ city: "Denver", month: "Jan", temp: -0.6 },
{ city: "Denver", month: "Feb", temp: 0.8 },
{ city: "Denver", month: "Mar", temp: 4.9 },
{ city: "Denver", month: "Apr", temp: 8.7 },
{ city: "Denver", month: "May", temp: 13.8 },
{ city: "Denver", month: "Jun", temp: 19.8 },
{ city: "Denver", month: "Jul", temp: 23.4 },
{ city: "Denver", month: "Aug", temp: 22.2 },
{ city: "Denver", month: "Sep", temp: 17.4 },
{ city: "Denver", month: "Oct", temp: 10.2 },
{ city: "Denver", month: "Nov", temp: 3.8 },
{ city: "Denver", month: "Dec", temp: -0.9 },
{ city: "Boston", month: "Jan", temp: -1.5 },
{ city: "Boston", month: "Feb", temp: -0.2 },
{ city: "Boston", month: "Mar", temp: 3.6 },
{ city: "Boston", month: "Apr", temp: 9.4 },
{ city: "Boston", month: "May", temp: 14.9 },
{ city: "Boston", month: "Jun", temp: 20.2 },
{ city: "Boston", month: "Jul", temp: 23.4 },
{ city: "Boston", month: "Aug", temp: 22.6 },
{ city: "Boston", month: "Sep", temp: 18.6 },
{ city: "Boston", month: "Oct", temp: 12.4 },
{ city: "Boston", month: "Nov", temp: 6.9 },
{ city: "Boston", month: "Dec", temp: 1.6 },
{ city: "Anchorage", month: "Jan", temp: -8.2 },
{ city: "Anchorage", month: "Feb", temp: -6.4 },
{ city: "Anchorage", month: "Mar", temp: -3.3 },
{ city: "Anchorage", month: "Apr", temp: 2.7 },
{ city: "Anchorage", month: "May", temp: 8.6 },
{ city: "Anchorage", month: "Jun", temp: 13.1 },
{ city: "Anchorage", month: "Jul", temp: 15.1 },
{ city: "Anchorage", month: "Aug", temp: 13.9 },
{ city: "Anchorage", month: "Sep", temp: 9.4 },
{ city: "Anchorage", month: "Oct", temp: 1.6 },
{ city: "Anchorage", month: "Nov", temp: -5.2 },
{ city: "Anchorage", month: "Dec", temp: -7.4 },
{ city: "Honolulu", month: "Jan", temp: 23 },
{ city: "Honolulu", month: "Feb", temp: 23.1 },
{ city: "Honolulu", month: "Mar", temp: 23.7 },
{ city: "Honolulu", month: "Apr", temp: 24.6 },
{ city: "Honolulu", month: "May", temp: 25.6 },
{ city: "Honolulu", month: "Jun", temp: 26.8 },
{ city: "Honolulu", month: "Jul", temp: 27.4 },
{ city: "Honolulu", month: "Aug", temp: 27.9 },
{ city: "Honolulu", month: "Sep", temp: 27.6 },
{ city: "Honolulu", month: "Oct", temp: 26.8 },
{ city: "Honolulu", month: "Nov", temp: 25.3 },
{ city: "Honolulu", month: "Dec", temp: 23.9 },
];
export function Example() {
return (
<SmallMultiples
data={data}
facet="city"
x="month"
y="temp"
context
format={"{value}°"}
height={380}
title="Chicago's average monthly temperature ranges from -3.2°C to 24.3°C"
subtitle="Average monthly temperature, °C. Honolulu ranges from 23.0 to 27.9. Grey lines show the other cities."
source="NOAA climate normals (rounded)"
note="Figures are approximate, for illustration"
/>
);
}{
"type": "small-multiples",
"data": [
{ "city": "Phoenix", "month": "Jan", "temp": 12.4 },
{ "city": "Phoenix", "month": "Feb", "temp": 14.1 },
{ "city": "Phoenix", "month": "Mar", "temp": 17.6 },
{ "city": "Phoenix", "month": "Apr", "temp": 22.8 },
{ "city": "Phoenix", "month": "May", "temp": 27.9 },
{ "city": "Phoenix", "month": "Jun", "temp": 31.2 },
{ "city": "Phoenix", "month": "Jul", "temp": 33 },
{ "city": "Phoenix", "month": "Aug", "temp": 31.8 },
{ "city": "Phoenix", "month": "Sep", "temp": 28.1 },
{ "city": "Phoenix", "month": "Oct", "temp": 21.7 },
{ "city": "Phoenix", "month": "Nov", "temp": 15.6 },
{ "city": "Phoenix", "month": "Dec", "temp": 12.1 },
{ "city": "Seattle", "month": "Jan", "temp": 5.6 },
{ "city": "Seattle", "month": "Feb", "temp": 6.8 },
{ "city": "Seattle", "month": "Mar", "temp": 8.6 },
{ "city": "Seattle", "month": "Apr", "temp": 10.9 },
{ "city": "Seattle", "month": "May", "temp": 14.2 },
{ "city": "Seattle", "month": "Jun", "temp": 16.9 },
{ "city": "Seattle", "month": "Jul", "temp": 19.6 },
{ "city": "Seattle", "month": "Aug", "temp": 19.8 },
{ "city": "Seattle", "month": "Sep", "temp": 17.1 },
{ "city": "Seattle", "month": "Oct", "temp": 12.3 },
{ "city": "Seattle", "month": "Nov", "temp": 8.1 },
{ "city": "Seattle", "month": "Dec", "temp": 5.6 },
{ "city": "Chicago", "month": "Jan", "temp": -3.2 },
{ "city": "Chicago", "month": "Feb", "temp": -1.2 },
{ "city": "Chicago", "month": "Mar", "temp": 4.4 },
{ "city": "Chicago", "month": "Apr", "temp": 10.5 },
{ "city": "Chicago", "month": "May", "temp": 16.1 },
{ "city": "Chicago", "month": "Jun", "temp": 21.7 },
{ "city": "Chicago", "month": "Jul", "temp": 24.3 },
{ "city": "Chicago", "month": "Aug", "temp": 23.4 },
{ "city": "Chicago", "month": "Sep", "temp": 19.1 },
{ "city": "Chicago", "month": "Oct", "temp": 12.1 },
{ "city": "Chicago", "month": "Nov", "temp": 5.4 },
{ "city": "Chicago", "month": "Dec", "temp": -1 },
{ "city": "Miami", "month": "Jan", "temp": 20.1 },
{ "city": "Miami", "month": "Feb", "temp": 21.2 },
{ "city": "Miami", "month": "Mar", "temp": 22.6 },
{ "city": "Miami", "month": "Apr", "temp": 24.4 },
{ "city": "Miami", "month": "May", "temp": 26.6 },
{ "city": "Miami", "month": "Jun", "temp": 28.1 },
{ "city": "Miami", "month": "Jul", "temp": 28.8 },
{ "city": "Miami", "month": "Aug", "temp": 28.9 },
{ "city": "Miami", "month": "Sep", "temp": 28.2 },
{ "city": "Miami", "month": "Oct", "temp": 26.3 },
{ "city": "Miami", "month": "Nov", "temp": 23.5 },
{ "city": "Miami", "month": "Dec", "temp": 21.3 },
{ "city": "Denver", "month": "Jan", "temp": -0.6 },
{ "city": "Denver", "month": "Feb", "temp": 0.8 },
{ "city": "Denver", "month": "Mar", "temp": 4.9 },
{ "city": "Denver", "month": "Apr", "temp": 8.7 },
{ "city": "Denver", "month": "May", "temp": 13.8 },
{ "city": "Denver", "month": "Jun", "temp": 19.8 },
{ "city": "Denver", "month": "Jul", "temp": 23.4 },
{ "city": "Denver", "month": "Aug", "temp": 22.2 },
{ "city": "Denver", "month": "Sep", "temp": 17.4 },
{ "city": "Denver", "month": "Oct", "temp": 10.2 },
{ "city": "Denver", "month": "Nov", "temp": 3.8 },
{ "city": "Denver", "month": "Dec", "temp": -0.9 },
{ "city": "Boston", "month": "Jan", "temp": -1.5 },
{ "city": "Boston", "month": "Feb", "temp": -0.2 },
{ "city": "Boston", "month": "Mar", "temp": 3.6 },
{ "city": "Boston", "month": "Apr", "temp": 9.4 },
{ "city": "Boston", "month": "May", "temp": 14.9 },
{ "city": "Boston", "month": "Jun", "temp": 20.2 },
{ "city": "Boston", "month": "Jul", "temp": 23.4 },
{ "city": "Boston", "month": "Aug", "temp": 22.6 },
{ "city": "Boston", "month": "Sep", "temp": 18.6 },
{ "city": "Boston", "month": "Oct", "temp": 12.4 },
{ "city": "Boston", "month": "Nov", "temp": 6.9 },
{ "city": "Boston", "month": "Dec", "temp": 1.6 },
{ "city": "Anchorage", "month": "Jan", "temp": -8.2 },
{ "city": "Anchorage", "month": "Feb", "temp": -6.4 },
{ "city": "Anchorage", "month": "Mar", "temp": -3.3 },
{ "city": "Anchorage", "month": "Apr", "temp": 2.7 },
{ "city": "Anchorage", "month": "May", "temp": 8.6 },
{ "city": "Anchorage", "month": "Jun", "temp": 13.1 },
{ "city": "Anchorage", "month": "Jul", "temp": 15.1 },
{ "city": "Anchorage", "month": "Aug", "temp": 13.9 },
{ "city": "Anchorage", "month": "Sep", "temp": 9.4 },
{ "city": "Anchorage", "month": "Oct", "temp": 1.6 },
{ "city": "Anchorage", "month": "Nov", "temp": -5.2 },
{ "city": "Anchorage", "month": "Dec", "temp": -7.4 },
{ "city": "Honolulu", "month": "Jan", "temp": 23 },
{ "city": "Honolulu", "month": "Feb", "temp": 23.1 },
{ "city": "Honolulu", "month": "Mar", "temp": 23.7 },
{ "city": "Honolulu", "month": "Apr", "temp": 24.6 },
{ "city": "Honolulu", "month": "May", "temp": 25.6 },
{ "city": "Honolulu", "month": "Jun", "temp": 26.8 },
{ "city": "Honolulu", "month": "Jul", "temp": 27.4 },
{ "city": "Honolulu", "month": "Aug", "temp": 27.9 },
{ "city": "Honolulu", "month": "Sep", "temp": 27.6 },
{ "city": "Honolulu", "month": "Oct", "temp": 26.8 },
{ "city": "Honolulu", "month": "Nov", "temp": 25.3 },
{ "city": "Honolulu", "month": "Dec", "temp": 23.9 }
],
"facet": "city",
"x": "month",
"y": "temp",
"context": true,
"format": "{value}°",
"height": 380,
"title": "Chicago's average monthly temperature ranges from -3.2°C to 24.3°C",
"subtitle": "Average monthly temperature, °C. Honolulu ranges from 23.0 to 27.9. Grey lines show the other cities.",
"source": "NOAA climate normals (rounded)",
"note": "Figures are approximate, for illustration"
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Bars, two series per panel (wide data)
The South sold $45 million online and $36 million in store in Q4
Quarterly sales by channel, $ millions
import { SmallMultiples } from "insightcharts";
const data = [
{ region: "North", quarter: "Q1", store: 42, online: 31 },
{ region: "North", quarter: "Q2", store: 48, online: 36 },
{ region: "North", quarter: "Q3", store: 55, online: 39 },
{ region: "North", quarter: "Q4", store: 61, online: 44 },
{ region: "South", quarter: "Q1", store: 28, online: 30 },
{ region: "South", quarter: "Q2", store: 31, online: 34 },
{ region: "South", quarter: "Q3", store: 33, online: 39 },
{ region: "South", quarter: "Q4", store: 36, online: 45 },
{ region: "East", quarter: "Q1", store: 51, online: 22 },
{ region: "East", quarter: "Q2", store: 49, online: 27 },
{ region: "East", quarter: "Q3", store: 46, online: 33 },
{ region: "East", quarter: "Q4", store: 44, online: 41 },
{ region: "West", quarter: "Q1", store: 19, online: 12 },
{ region: "West", quarter: "Q2", store: 24, online: 16 },
{ region: "West", quarter: "Q3", store: 31, online: 22 },
{ region: "West", quarter: "Q4", store: 40, online: 29 },
];
export function Example() {
return (
<SmallMultiples
data={data}
facet="region"
x="quarter"
y={["store", "online"]}
names={{ store: "In store", online: "Online" }}
kind="bar"
format="currency:USD"
height={300}
title="The South sold $45 million online and $36 million in store in Q4"
subtitle="Quarterly sales by channel, $ millions"
note="Illustrative figures."
/>
);
}{
"type": "small-multiples",
"data": [
{ "region": "North", "quarter": "Q1", "store": 42, "online": 31 },
{ "region": "North", "quarter": "Q2", "store": 48, "online": 36 },
{ "region": "North", "quarter": "Q3", "store": 55, "online": 39 },
{ "region": "North", "quarter": "Q4", "store": 61, "online": 44 },
{ "region": "South", "quarter": "Q1", "store": 28, "online": 30 },
{ "region": "South", "quarter": "Q2", "store": 31, "online": 34 },
{ "region": "South", "quarter": "Q3", "store": 33, "online": 39 },
{ "region": "South", "quarter": "Q4", "store": 36, "online": 45 },
{ "region": "East", "quarter": "Q1", "store": 51, "online": 22 },
{ "region": "East", "quarter": "Q2", "store": 49, "online": 27 },
{ "region": "East", "quarter": "Q3", "store": 46, "online": 33 },
{ "region": "East", "quarter": "Q4", "store": 44, "online": 41 },
{ "region": "West", "quarter": "Q1", "store": 19, "online": 12 },
{ "region": "West", "quarter": "Q2", "store": 24, "online": 16 },
{ "region": "West", "quarter": "Q3", "store": 31, "online": 22 },
{ "region": "West", "quarter": "Q4", "store": 40, "online": 29 }
],
"facet": "region",
"x": "quarter",
"y": ["store", "online"],
"names": { "store": "In store", "online": "Online" },
"kind": "bar",
"format": "currency:USD",
"height": 300,
"title": "The South sold $45 million online and $36 million in store in Q4",
"subtitle": "Quarterly sales by channel, $ millions",
"note": "Illustrative figures."
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Stress: 20 panels with long titles
Illustrative index for 20 countries, 2013 to 2024
Index, 2013 = 100. All panels share the same axes.
import { SmallMultiples } from "insightcharts";
const data = [
{ country: "United States of America", year: "2013", index: 100 },
{ country: "United States of America", year: "2014", index: 101 },
{ country: "United States of America", year: "2015", index: 96 },
{ country: "United States of America", year: "2016", index: 91 },
{ country: "United States of America", year: "2017", index: 92 },
{ country: "United States of America", year: "2018", index: 87 },
{ country: "United States of America", year: "2019", index: 82 },
{ country: "United States of America", year: "2020", index: 71 },
{ country: "United States of America", year: "2021", index: 80 },
{ country: "United States of America", year: "2022", index: 75 },
{ country: "United States of America", year: "2023", index: 70 },
{ country: "United States of America", year: "2024", index: 73 },
{ country: "China", year: "2013", index: 106 },
{ country: "China", year: "2014", index: 109 },
{ country: "China", year: "2015", index: 112 },
{ country: "China", year: "2016", index: 115 },
{ country: "China", year: "2017", index: 126 },
{ country: "China", year: "2018", index: 129 },
{ country: "China", year: "2019", index: 133 },
{ country: "China", year: "2020", index: 137 },
{ country: "China", year: "2021", index: 150 },
{ country: "China", year: "2022", index: 154 },
{ country: "China", year: "2023", index: 160 },
{ country: "China", year: "2024", index: 172 },
{ country: "Japan", year: "2013", index: 105 },
{ country: "Japan", year: "2014", index: 103 },
{ country: "Japan", year: "2015", index: 101 },
{ country: "Japan", year: "2016", index: 106 },
{ country: "Japan", year: "2017", index: 104 },
{ country: "Japan", year: "2018", index: 102 },
{ country: "Japan", year: "2019", index: 100 },
{ country: "Japan", year: "2020", index: 95 },
{ country: "Japan", year: "2021", index: 103 },
{ country: "Japan", year: "2022", index: 101 },
{ country: "Japan", year: "2023", index: 106 },
{ country: "Japan", year: "2024", index: 104 },
{ country: "Germany", year: "2013", index: 104 },
{ country: "Germany", year: "2014", index: 110 },
{ country: "Germany", year: "2015", index: 118 },
{ country: "Germany", year: "2016", index: 132 },
{ country: "Germany", year: "2017", index: 141 },
{ country: "Germany", year: "2018", index: 151 },
{ country: "Germany", year: "2019", index: 168 },
{ country: "Germany", year: "2020", index: 168 },
{ country: "Germany", year: "2021", index: 193 },
{ country: "Germany", year: "2022", index: 207 },
{ country: "Germany", year: "2023", index: 229 },
{ country: "Germany", year: "2024", index: 246 },
{ country: "India", year: "2013", index: 103 },
{ country: "India", year: "2014", index: 105 },
{ country: "India", year: "2015", index: 113 },
{ country: "India", year: "2016", index: 115 },
{ country: "India", year: "2017", index: 117 },
{ country: "India", year: "2018", index: 119 },
{ country: "India", year: "2019", index: 129 },
{ country: "India", year: "2020", index: 125 },
{ country: "India", year: "2021", index: 134 },
{ country: "India", year: "2022", index: 143 },
{ country: "India", year: "2023", index: 146 },
{ country: "India", year: "2024", index: 150 },
{ country: "United Kingdom of Great Britain", year: "2013", index: 102 },
{ country: "United Kingdom of Great Britain", year: "2014", index: 99 },
{ country: "United Kingdom of Great Britain", year: "2015", index: 103 },
{ country: "United Kingdom of Great Britain", year: "2016", index: 99 },
{ country: "United Kingdom of Great Britain", year: "2017", index: 96 },
{ country: "United Kingdom of Great Britain", year: "2018", index: 100 },
{ country: "United Kingdom of Great Britain", year: "2019", index: 97 },
{ country: "United Kingdom of Great Britain", year: "2020", index: 86 },
{ country: "United Kingdom of Great Britain", year: "2021", index: 91 },
{ country: "United Kingdom of Great Britain", year: "2022", index: 95 },
{ country: "United Kingdom of Great Britain", year: "2023", index: 92 },
{ country: "United Kingdom of Great Britain", year: "2024", index: 89 },
{ country: "France", year: "2013", index: 101 },
{ country: "France", year: "2014", index: 113 },
{ country: "France", year: "2015", index: 119 },
{ country: "France", year: "2016", index: 125 },
{ country: "France", year: "2017", index: 132 },
{ country: "France", year: "2018", index: 147 },
{ country: "France", year: "2019", index: 155 },
{ country: "France", year: "2020", index: 154 },
{ country: "France", year: "2021", index: 180 },
{ country: "France", year: "2022", index: 191 },
{ country: "France", year: "2023", index: 202 },
{ country: "France", year: "2024", index: 215 },
{ country: "Italy", year: "2013", index: 100 },
{ country: "Italy", year: "2014", index: 107 },
{ country: "Italy", year: "2015", index: 108 },
{ country: "Italy", year: "2016", index: 108 },
{ country: "Italy", year: "2017", index: 116 },
{ country: "Italy", year: "2018", index: 117 },
{ country: "Italy", year: "2019", index: 117 },
{ country: "Italy", year: "2020", index: 106 },
{ country: "Italy", year: "2021", index: 126 },
{ country: "Italy", year: "2022", index: 127 },
{ country: "Italy", year: "2023", index: 128 },
{ country: "Italy", year: "2024", index: 136 },
{ country: "Brazil", year: "2013", index: 106 },
{ country: "Brazil", year: "2014", index: 102 },
{ country: "Brazil", year: "2015", index: 97 },
{ country: "Brazil", year: "2016", index: 93 },
{ country: "Brazil", year: "2017", index: 96 },
{ country: "Brazil", year: "2018", index: 92 },
{ country: "Brazil", year: "2019", index: 87 },
{ country: "Brazil", year: "2020", index: 84 },
{ country: "Brazil", year: "2021", index: 86 },
{ country: "Brazil", year: "2022", index: 82 },
{ country: "Brazil", year: "2023", index: 78 },
{ country: "Brazil", year: "2024", index: 82 },
{ country: "Canada", year: "2013", index: 105 },
{ country: "Canada", year: "2014", index: 109 },
{ country: "Canada", year: "2015", index: 113 },
{ country: "Canada", year: "2016", index: 125 },
{ country: "Canada", year: "2017", index: 130 },
{ country: "Canada", year: "2018", index: 136 },
{ country: "Canada", year: "2019", index: 142 },
{ country: "Canada", year: "2020", index: 147 },
{ country: "Canada", year: "2021", index: 162 },
{ country: "Canada", year: "2022", index: 170 },
{ country: "Canada", year: "2023", index: 185 },
{ country: "Canada", year: "2024", index: 194 },
{ country: "Russian Federation", year: "2013", index: 104 },
{ country: "Russian Federation", year: "2014", index: 103 },
{ country: "Russian Federation", year: "2015", index: 102 },
{ country: "Russian Federation", year: "2016", index: 109 },
{ country: "Russian Federation", year: "2017", index: 108 },
{ country: "Russian Federation", year: "2018", index: 107 },
{ country: "Russian Federation", year: "2019", index: 113 },
{ country: "Russian Federation", year: "2020", index: 103 },
{ country: "Russian Federation", year: "2021", index: 112 },
{ country: "Russian Federation", year: "2022", index: 111 },
{ country: "Russian Federation", year: "2023", index: 118 },
{ country: "Russian Federation", year: "2024", index: 117 },
{ country: "Republic of Korea", year: "2013", index: 103 },
{ country: "Republic of Korea", year: "2014", index: 97 },
{ country: "Republic of Korea", year: "2015", index: 99 },
{ country: "Republic of Korea", year: "2016", index: 94 },
{ country: "Republic of Korea", year: "2017", index: 88 },
{ country: "Republic of Korea", year: "2018", index: 83 },
{ country: "Republic of Korea", year: "2019", index: 85 },
{ country: "Republic of Korea", year: "2020", index: 68 },
{ country: "Republic of Korea", year: "2021", index: 76 },
{ country: "Republic of Korea", year: "2022", index: 78 },
{ country: "Republic of Korea", year: "2023", index: 73 },
{ country: "Republic of Korea", year: "2024", index: 69 },
{ country: "Australia", year: "2013", index: 102 },
{ country: "Australia", year: "2014", index: 105 },
{ country: "Australia", year: "2015", index: 115 },
{ country: "Australia", year: "2016", index: 118 },
{ country: "Australia", year: "2017", index: 122 },
{ country: "Australia", year: "2018", index: 132 },
{ country: "Australia", year: "2019", index: 136 },
{ country: "Australia", year: "2020", index: 135 },
{ country: "Australia", year: "2021", index: 146 },
{ country: "Australia", year: "2022", index: 157 },
{ country: "Australia", year: "2023", index: 163 },
{ country: "Australia", year: "2024", index: 168 },
{ country: "Mexico", year: "2013", index: 101 },
{ country: "Mexico", year: "2014", index: 106 },
{ country: "Mexico", year: "2015", index: 104 },
{ country: "Mexico", year: "2016", index: 102 },
{ country: "Mexico", year: "2017", index: 100 },
{ country: "Mexico", year: "2018", index: 105 },
{ country: "Mexico", year: "2019", index: 103 },
{ country: "Mexico", year: "2020", index: 93 },
{ country: "Mexico", year: "2021", index: 106 },
{ country: "Mexico", year: "2022", index: 104 },
{ country: "Mexico", year: "2023", index: 102 },
{ country: "Mexico", year: "2024", index: 100 },
{ country: "Spain", year: "2013", index: 100 },
{ country: "Spain", year: "2014", index: 113 },
{ country: "Spain", year: "2015", index: 121 },
{ country: "Spain", year: "2016", index: 128 },
{ country: "Spain", year: "2017", index: 144 },
{ country: "Spain", year: "2018", index: 154 },
{ country: "Spain", year: "2019", index: 164 },
{ country: "Spain", year: "2020", index: 166 },
{ country: "Spain", year: "2021", index: 196 },
{ country: "Spain", year: "2022", index: 210 },
{ country: "Spain", year: "2023", index: 225 },
{ country: "Spain", year: "2024", index: 249 },
{ country: "Indonesia", year: "2013", index: 106 },
{ country: "Indonesia", year: "2014", index: 108 },
{ country: "Indonesia", year: "2015", index: 109 },
{ country: "Indonesia", year: "2016", index: 111 },
{ country: "Indonesia", year: "2017", index: 120 },
{ country: "Indonesia", year: "2018", index: 122 },
{ country: "Indonesia", year: "2019", index: 125 },
{ country: "Indonesia", year: "2020", index: 122 },
{ country: "Indonesia", year: "2021", index: 137 },
{ country: "Indonesia", year: "2022", index: 139 },
{ country: "Indonesia", year: "2023", index: 142 },
{ country: "Indonesia", year: "2024", index: 153 },
{ country: "Kingdom of the Netherlands", year: "2013", index: 105 },
{ country: "Kingdom of the Netherlands", year: "2014", index: 102 },
{ country: "Kingdom of the Netherlands", year: "2015", index: 99 },
{ country: "Kingdom of the Netherlands", year: "2016", index: 102 },
{ country: "Kingdom of the Netherlands", year: "2017", index: 99 },
{ country: "Kingdom of the Netherlands", year: "2018", index: 96 },
{ country: "Kingdom of the Netherlands", year: "2019", index: 93 },
{ country: "Kingdom of the Netherlands", year: "2020", index: 91 },
{ country: "Kingdom of the Netherlands", year: "2021", index: 94 },
{ country: "Kingdom of the Netherlands", year: "2022", index: 91 },
{ country: "Kingdom of the Netherlands", year: "2023", index: 95 },
{ country: "Kingdom of the Netherlands", year: "2024", index: 92 },
{ country: "Saudi Arabia", year: "2013", index: 104 },
{ country: "Saudi Arabia", year: "2014", index: 109 },
{ country: "Saudi Arabia", year: "2015", index: 115 },
{ country: "Saudi Arabia", year: "2016", index: 128 },
{ country: "Saudi Arabia", year: "2017", index: 135 },
{ country: "Saudi Arabia", year: "2018", index: 143 },
{ country: "Saudi Arabia", year: "2019", index: 158 },
{ country: "Saudi Arabia", year: "2020", index: 159 },
{ country: "Saudi Arabia", year: "2021", index: 176 },
{ country: "Saudi Arabia", year: "2022", index: 187 },
{ country: "Saudi Arabia", year: "2023", index: 205 },
{ country: "Saudi Arabia", year: "2024", index: 218 },
{ country: "Türkiye", year: "2013", index: 103 },
{ country: "Türkiye", year: "2014", index: 103 },
{ country: "Türkiye", year: "2015", index: 111 },
{ country: "Türkiye", year: "2016", index: 111 },
{ country: "Türkiye", year: "2017", index: 112 },
{ country: "Türkiye", year: "2018", index: 113 },
{ country: "Türkiye", year: "2019", index: 120 },
{ country: "Türkiye", year: "2020", index: 111 },
{ country: "Türkiye", year: "2021", index: 122 },
{ country: "Türkiye", year: "2022", index: 130 },
{ country: "Türkiye", year: "2023", index: 131 },
{ country: "Türkiye", year: "2024", index: 132 },
{ country: "Switzerland", year: "2013", index: 102 },
{ country: "Switzerland", year: "2014", index: 98 },
{ country: "Switzerland", year: "2015", index: 100 },
{ country: "Switzerland", year: "2016", index: 96 },
{ country: "Switzerland", year: "2017", index: 92 },
{ country: "Switzerland", year: "2018", index: 95 },
{ country: "Switzerland", year: "2019", index: 90 },
{ country: "Switzerland", year: "2020", index: 74 },
{ country: "Switzerland", year: "2021", index: 82 },
{ country: "Switzerland", year: "2022", index: 85 },
{ country: "Switzerland", year: "2023", index: 81 },
{ country: "Switzerland", year: "2024", index: 78 },
];
export function Example() {
return (
<SmallMultiples
data={data}
facet="country"
x="year"
y="index"
kind="area"
highlight={["India", "Indonesia"]}
height={560}
title="Illustrative index for 20 countries, 2013 to 2024"
subtitle="Index, 2013 = 100. All panels share the same axes."
note="Synthetic data for layout testing."
/>
);
}{
"type": "small-multiples",
"data": [
{ "country": "United States of America", "year": "2013", "index": 100 },
{ "country": "United States of America", "year": "2014", "index": 101 },
{ "country": "United States of America", "year": "2015", "index": 96 },
{ "country": "United States of America", "year": "2016", "index": 91 },
{ "country": "United States of America", "year": "2017", "index": 92 },
{ "country": "United States of America", "year": "2018", "index": 87 },
{ "country": "United States of America", "year": "2019", "index": 82 },
{ "country": "United States of America", "year": "2020", "index": 71 },
{ "country": "United States of America", "year": "2021", "index": 80 },
{ "country": "United States of America", "year": "2022", "index": 75 },
{ "country": "United States of America", "year": "2023", "index": 70 },
{ "country": "United States of America", "year": "2024", "index": 73 },
{ "country": "China", "year": "2013", "index": 106 },
{ "country": "China", "year": "2014", "index": 109 },
{ "country": "China", "year": "2015", "index": 112 },
{ "country": "China", "year": "2016", "index": 115 },
{ "country": "China", "year": "2017", "index": 126 },
{ "country": "China", "year": "2018", "index": 129 },
{ "country": "China", "year": "2019", "index": 133 },
{ "country": "China", "year": "2020", "index": 137 },
{ "country": "China", "year": "2021", "index": 150 },
{ "country": "China", "year": "2022", "index": 154 },
{ "country": "China", "year": "2023", "index": 160 },
{ "country": "China", "year": "2024", "index": 172 },
{ "country": "Japan", "year": "2013", "index": 105 },
{ "country": "Japan", "year": "2014", "index": 103 },
{ "country": "Japan", "year": "2015", "index": 101 },
{ "country": "Japan", "year": "2016", "index": 106 },
{ "country": "Japan", "year": "2017", "index": 104 },
{ "country": "Japan", "year": "2018", "index": 102 },
{ "country": "Japan", "year": "2019", "index": 100 },
{ "country": "Japan", "year": "2020", "index": 95 },
{ "country": "Japan", "year": "2021", "index": 103 },
{ "country": "Japan", "year": "2022", "index": 101 },
{ "country": "Japan", "year": "2023", "index": 106 },
{ "country": "Japan", "year": "2024", "index": 104 },
{ "country": "Germany", "year": "2013", "index": 104 },
{ "country": "Germany", "year": "2014", "index": 110 },
{ "country": "Germany", "year": "2015", "index": 118 },
{ "country": "Germany", "year": "2016", "index": 132 },
{ "country": "Germany", "year": "2017", "index": 141 },
{ "country": "Germany", "year": "2018", "index": 151 },
{ "country": "Germany", "year": "2019", "index": 168 },
{ "country": "Germany", "year": "2020", "index": 168 },
{ "country": "Germany", "year": "2021", "index": 193 },
{ "country": "Germany", "year": "2022", "index": 207 },
{ "country": "Germany", "year": "2023", "index": 229 },
{ "country": "Germany", "year": "2024", "index": 246 },
{ "country": "India", "year": "2013", "index": 103 },
{ "country": "India", "year": "2014", "index": 105 },
{ "country": "India", "year": "2015", "index": 113 },
{ "country": "India", "year": "2016", "index": 115 },
{ "country": "India", "year": "2017", "index": 117 },
{ "country": "India", "year": "2018", "index": 119 },
{ "country": "India", "year": "2019", "index": 129 },
{ "country": "India", "year": "2020", "index": 125 },
{ "country": "India", "year": "2021", "index": 134 },
{ "country": "India", "year": "2022", "index": 143 },
{ "country": "India", "year": "2023", "index": 146 },
{ "country": "India", "year": "2024", "index": 150 },
{ "country": "United Kingdom of Great Britain", "year": "2013", "index": 102 },
{ "country": "United Kingdom of Great Britain", "year": "2014", "index": 99 },
{ "country": "United Kingdom of Great Britain", "year": "2015", "index": 103 },
{ "country": "United Kingdom of Great Britain", "year": "2016", "index": 99 },
{ "country": "United Kingdom of Great Britain", "year": "2017", "index": 96 },
{ "country": "United Kingdom of Great Britain", "year": "2018", "index": 100 },
{ "country": "United Kingdom of Great Britain", "year": "2019", "index": 97 },
{ "country": "United Kingdom of Great Britain", "year": "2020", "index": 86 },
{ "country": "United Kingdom of Great Britain", "year": "2021", "index": 91 },
{ "country": "United Kingdom of Great Britain", "year": "2022", "index": 95 },
{ "country": "United Kingdom of Great Britain", "year": "2023", "index": 92 },
{ "country": "United Kingdom of Great Britain", "year": "2024", "index": 89 },
{ "country": "France", "year": "2013", "index": 101 },
{ "country": "France", "year": "2014", "index": 113 },
{ "country": "France", "year": "2015", "index": 119 },
{ "country": "France", "year": "2016", "index": 125 },
{ "country": "France", "year": "2017", "index": 132 },
{ "country": "France", "year": "2018", "index": 147 },
{ "country": "France", "year": "2019", "index": 155 },
{ "country": "France", "year": "2020", "index": 154 },
{ "country": "France", "year": "2021", "index": 180 },
{ "country": "France", "year": "2022", "index": 191 },
{ "country": "France", "year": "2023", "index": 202 },
{ "country": "France", "year": "2024", "index": 215 },
{ "country": "Italy", "year": "2013", "index": 100 },
{ "country": "Italy", "year": "2014", "index": 107 },
{ "country": "Italy", "year": "2015", "index": 108 },
{ "country": "Italy", "year": "2016", "index": 108 },
{ "country": "Italy", "year": "2017", "index": 116 },
{ "country": "Italy", "year": "2018", "index": 117 },
{ "country": "Italy", "year": "2019", "index": 117 },
{ "country": "Italy", "year": "2020", "index": 106 },
{ "country": "Italy", "year": "2021", "index": 126 },
{ "country": "Italy", "year": "2022", "index": 127 },
{ "country": "Italy", "year": "2023", "index": 128 },
{ "country": "Italy", "year": "2024", "index": 136 },
{ "country": "Brazil", "year": "2013", "index": 106 },
{ "country": "Brazil", "year": "2014", "index": 102 },
{ "country": "Brazil", "year": "2015", "index": 97 },
{ "country": "Brazil", "year": "2016", "index": 93 },
{ "country": "Brazil", "year": "2017", "index": 96 },
{ "country": "Brazil", "year": "2018", "index": 92 },
{ "country": "Brazil", "year": "2019", "index": 87 },
{ "country": "Brazil", "year": "2020", "index": 84 },
{ "country": "Brazil", "year": "2021", "index": 86 },
{ "country": "Brazil", "year": "2022", "index": 82 },
{ "country": "Brazil", "year": "2023", "index": 78 },
{ "country": "Brazil", "year": "2024", "index": 82 },
{ "country": "Canada", "year": "2013", "index": 105 },
{ "country": "Canada", "year": "2014", "index": 109 },
{ "country": "Canada", "year": "2015", "index": 113 },
{ "country": "Canada", "year": "2016", "index": 125 },
{ "country": "Canada", "year": "2017", "index": 130 },
{ "country": "Canada", "year": "2018", "index": 136 },
{ "country": "Canada", "year": "2019", "index": 142 },
{ "country": "Canada", "year": "2020", "index": 147 },
{ "country": "Canada", "year": "2021", "index": 162 },
{ "country": "Canada", "year": "2022", "index": 170 },
{ "country": "Canada", "year": "2023", "index": 185 },
{ "country": "Canada", "year": "2024", "index": 194 },
{ "country": "Russian Federation", "year": "2013", "index": 104 },
{ "country": "Russian Federation", "year": "2014", "index": 103 },
{ "country": "Russian Federation", "year": "2015", "index": 102 },
{ "country": "Russian Federation", "year": "2016", "index": 109 },
{ "country": "Russian Federation", "year": "2017", "index": 108 },
{ "country": "Russian Federation", "year": "2018", "index": 107 },
{ "country": "Russian Federation", "year": "2019", "index": 113 },
{ "country": "Russian Federation", "year": "2020", "index": 103 },
{ "country": "Russian Federation", "year": "2021", "index": 112 },
{ "country": "Russian Federation", "year": "2022", "index": 111 },
{ "country": "Russian Federation", "year": "2023", "index": 118 },
{ "country": "Russian Federation", "year": "2024", "index": 117 },
{ "country": "Republic of Korea", "year": "2013", "index": 103 },
{ "country": "Republic of Korea", "year": "2014", "index": 97 },
{ "country": "Republic of Korea", "year": "2015", "index": 99 },
{ "country": "Republic of Korea", "year": "2016", "index": 94 },
{ "country": "Republic of Korea", "year": "2017", "index": 88 },
{ "country": "Republic of Korea", "year": "2018", "index": 83 },
{ "country": "Republic of Korea", "year": "2019", "index": 85 },
{ "country": "Republic of Korea", "year": "2020", "index": 68 },
{ "country": "Republic of Korea", "year": "2021", "index": 76 },
{ "country": "Republic of Korea", "year": "2022", "index": 78 },
{ "country": "Republic of Korea", "year": "2023", "index": 73 },
{ "country": "Republic of Korea", "year": "2024", "index": 69 },
{ "country": "Australia", "year": "2013", "index": 102 },
{ "country": "Australia", "year": "2014", "index": 105 },
{ "country": "Australia", "year": "2015", "index": 115 },
{ "country": "Australia", "year": "2016", "index": 118 },
{ "country": "Australia", "year": "2017", "index": 122 },
{ "country": "Australia", "year": "2018", "index": 132 },
{ "country": "Australia", "year": "2019", "index": 136 },
{ "country": "Australia", "year": "2020", "index": 135 },
{ "country": "Australia", "year": "2021", "index": 146 },
{ "country": "Australia", "year": "2022", "index": 157 },
{ "country": "Australia", "year": "2023", "index": 163 },
{ "country": "Australia", "year": "2024", "index": 168 },
{ "country": "Mexico", "year": "2013", "index": 101 },
{ "country": "Mexico", "year": "2014", "index": 106 },
{ "country": "Mexico", "year": "2015", "index": 104 },
{ "country": "Mexico", "year": "2016", "index": 102 },
{ "country": "Mexico", "year": "2017", "index": 100 },
{ "country": "Mexico", "year": "2018", "index": 105 },
{ "country": "Mexico", "year": "2019", "index": 103 },
{ "country": "Mexico", "year": "2020", "index": 93 },
{ "country": "Mexico", "year": "2021", "index": 106 },
{ "country": "Mexico", "year": "2022", "index": 104 },
{ "country": "Mexico", "year": "2023", "index": 102 },
{ "country": "Mexico", "year": "2024", "index": 100 },
{ "country": "Spain", "year": "2013", "index": 100 },
{ "country": "Spain", "year": "2014", "index": 113 },
{ "country": "Spain", "year": "2015", "index": 121 },
{ "country": "Spain", "year": "2016", "index": 128 },
{ "country": "Spain", "year": "2017", "index": 144 },
{ "country": "Spain", "year": "2018", "index": 154 },
{ "country": "Spain", "year": "2019", "index": 164 },
{ "country": "Spain", "year": "2020", "index": 166 },
{ "country": "Spain", "year": "2021", "index": 196 },
{ "country": "Spain", "year": "2022", "index": 210 },
{ "country": "Spain", "year": "2023", "index": 225 },
{ "country": "Spain", "year": "2024", "index": 249 },
{ "country": "Indonesia", "year": "2013", "index": 106 },
{ "country": "Indonesia", "year": "2014", "index": 108 },
{ "country": "Indonesia", "year": "2015", "index": 109 },
{ "country": "Indonesia", "year": "2016", "index": 111 },
{ "country": "Indonesia", "year": "2017", "index": 120 },
{ "country": "Indonesia", "year": "2018", "index": 122 },
{ "country": "Indonesia", "year": "2019", "index": 125 },
{ "country": "Indonesia", "year": "2020", "index": 122 },
{ "country": "Indonesia", "year": "2021", "index": 137 },
{ "country": "Indonesia", "year": "2022", "index": 139 },
{ "country": "Indonesia", "year": "2023", "index": 142 },
{ "country": "Indonesia", "year": "2024", "index": 153 },
{ "country": "Kingdom of the Netherlands", "year": "2013", "index": 105 },
{ "country": "Kingdom of the Netherlands", "year": "2014", "index": 102 },
{ "country": "Kingdom of the Netherlands", "year": "2015", "index": 99 },
{ "country": "Kingdom of the Netherlands", "year": "2016", "index": 102 },
{ "country": "Kingdom of the Netherlands", "year": "2017", "index": 99 },
{ "country": "Kingdom of the Netherlands", "year": "2018", "index": 96 },
{ "country": "Kingdom of the Netherlands", "year": "2019", "index": 93 },
{ "country": "Kingdom of the Netherlands", "year": "2020", "index": 91 },
{ "country": "Kingdom of the Netherlands", "year": "2021", "index": 94 },
{ "country": "Kingdom of the Netherlands", "year": "2022", "index": 91 },
{ "country": "Kingdom of the Netherlands", "year": "2023", "index": 95 },
{ "country": "Kingdom of the Netherlands", "year": "2024", "index": 92 },
{ "country": "Saudi Arabia", "year": "2013", "index": 104 },
{ "country": "Saudi Arabia", "year": "2014", "index": 109 },
{ "country": "Saudi Arabia", "year": "2015", "index": 115 },
{ "country": "Saudi Arabia", "year": "2016", "index": 128 },
{ "country": "Saudi Arabia", "year": "2017", "index": 135 },
{ "country": "Saudi Arabia", "year": "2018", "index": 143 },
{ "country": "Saudi Arabia", "year": "2019", "index": 158 },
{ "country": "Saudi Arabia", "year": "2020", "index": 159 },
{ "country": "Saudi Arabia", "year": "2021", "index": 176 },
{ "country": "Saudi Arabia", "year": "2022", "index": 187 },
{ "country": "Saudi Arabia", "year": "2023", "index": 205 },
{ "country": "Saudi Arabia", "year": "2024", "index": 218 },
{ "country": "Türkiye", "year": "2013", "index": 103 },
{ "country": "Türkiye", "year": "2014", "index": 103 },
{ "country": "Türkiye", "year": "2015", "index": 111 },
{ "country": "Türkiye", "year": "2016", "index": 111 },
{ "country": "Türkiye", "year": "2017", "index": 112 },
{ "country": "Türkiye", "year": "2018", "index": 113 },
{ "country": "Türkiye", "year": "2019", "index": 120 },
{ "country": "Türkiye", "year": "2020", "index": 111 },
{ "country": "Türkiye", "year": "2021", "index": 122 },
{ "country": "Türkiye", "year": "2022", "index": 130 },
{ "country": "Türkiye", "year": "2023", "index": 131 },
{ "country": "Türkiye", "year": "2024", "index": 132 },
{ "country": "Switzerland", "year": "2013", "index": 102 },
{ "country": "Switzerland", "year": "2014", "index": 98 },
{ "country": "Switzerland", "year": "2015", "index": 100 },
{ "country": "Switzerland", "year": "2016", "index": 96 },
{ "country": "Switzerland", "year": "2017", "index": 92 },
{ "country": "Switzerland", "year": "2018", "index": 95 },
{ "country": "Switzerland", "year": "2019", "index": 90 },
{ "country": "Switzerland", "year": "2020", "index": 74 },
{ "country": "Switzerland", "year": "2021", "index": 82 },
{ "country": "Switzerland", "year": "2022", "index": 85 },
{ "country": "Switzerland", "year": "2023", "index": 81 },
{ "country": "Switzerland", "year": "2024", "index": 78 }
],
"facet": "country",
"x": "year",
"y": "index",
"kind": "area",
"highlight": ["India", "Indonesia"],
"height": 560,
"title": "Illustrative index for 20 countries, 2013 to 2024",
"subtitle": "Index, 2013 = 100. All panels share the same axes.",
"note": "Synthetic data for layout testing."
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| facetrequired | string | Field whose values each get a panel. | |
| xrequired | string | Time or ordered category field, shared by every panel. | |
| yrequired | string | string[] | Value field, or several (one series each in every panel). | |
| series | string | Field that splits rows into series inside each panel (long data). | |
| kind | "line" | "area" | "bar" | "line" | What each panel draws. Area and bar panels start at zero. |
| columns | number | Preferred number of columns; reduced automatically on narrow containers. | |
| scales | "shared" | "free" | "shared" | Shared value scale across panels, or each panel on its own (say so in the subtitle). |
| context | boolean | false | Draw every other panel's line faintly behind each panel's own. |
| latest | boolean | Print the latest value beside each panel title. Default: on for a single series. | |
| names | Record<string, string> | Display names for facet values and series keys. |
Common chart props 29
Every chart built with defineChart accepts these on top of its own props.
| Prop | Type | Description |
|---|---|---|
| data | DataInput | Rows, CSV text, a URL, { url, path }, an async function, or an Arrow-style table. Omit inside <InsightData>. |
| transform | Transform | Transform[] | A pipeline of transforms applied before drawing. |
| title | string | The title. One plain statement of what the data shows, with the number and the period ("Monthly churn fell from 4.2% to 2.1% in 2024"), or a plain label ("Monthly churn, 2024"). One clause, no figures of speech. |
| subtitle | string | Measure, unit, population, period. |
| source | string | Data source, shown as "Source: ...". |
| note | string | Method notes or caveats. |
| height | number | string | CSS height of the plot. Default 360. |
| aspect | number | Width / height. Overrides height. |
| highlight | string | string[] | The entity (or entities) the title is about. Every other series is drawn in grey. |
| annotations | Annotation[] | Reference lines, shaded bands and callouts, in data coordinates. |
| format | FormatSpec | How to print values: "compact", "percent", "currency:USD", "{value} kg", Intl options, or a function. |
| legend | boolean | Show the legend. Default: shown when there are two or more series. |
| select | boolean | string | Make marks clickable to filter. Inside <InsightData> the selection filters every other chart. Pass a field name, or true to use the chart's category field. |
| onSelect | (values: string[], field: string) => void | Called with the selected values whenever the selection changes. |
| option | EChartsOption | ((option: EChartsOption, ctx: BuildContext) => EChartsOption) | Deep-merged over the generated ECharts option, or a function that receives and returns it. Use it for ECharts settings no prop covers. |
| theme | ThemeInput | A theme, or a partial set of tokens merged over the surrounding theme, for this chart only. |
| mode | ModeInput | "auto" (default) follows the page, "system" follows the OS, or force "light" / "dark". |
| renderer | RendererInput | "auto" (default) uses SVG for light charts and canvas for heavy ones. |
| animate | boolean | Set false to disable animation. Reduced-motion preferences are always respected. |
| lazy | boolean | Mount the chart only when it scrolls near the viewport. Default true. |
| group | string | Link tooltips with other charts sharing this group id. |
| exportable | boolean | ExportFormat[] | Show an export menu: true or a list of formats from png, jpeg, svg, pdf, csv, json. |
| table | boolean | Show a collapsible "View data" table under the chart. |
| alt | string | Accessible description: the chart type and measures, then the main pattern and the notable values. |
| id | string | Stable id for this chart's selection in the shared store. |
| onEvents | Record<string, ChartEventHandler> | ECharts event handlers, e.g. { click: (params, chart) => {} }. Prefix a name with zr: to bind to the canvas itself. |
| onReady | (chart: EChartsInstance) => void | Called with the ECharts instance once it is created. |
| className | string | Class name for the outer <figure>. |
| style | CSSProperties | Inline style for the outer <figure>. |