A poster of change over a run of periods: a full-width ribbon of bands whose thickness is each entity's value and whose order is its rank (ribbon-chart), a strip of two to four dated figures under it, and a bottom row with one measure per period as thick bars (block-bar) and one share at several dates as nested outlines (nested-shares).
Ribbon chart
One filled band per entity across periods: its thickness is its value in each period and its vertical position is its rank, so bands cross as the order changes.
- Use when
- 4 to 8 entities over 4 to 10 periods when both the size of each and the changing order matter, and the graphic should read as one flowing form: market shares, harvests, medal tables, budget lines.
- Avoid when
- Totals that matter more than order, or a smooth centred stream of many periods (use area chart, which has stacked and stream modes); rank alone (use bump chart); more than 8 entities or 10 periods (use line chart or small multiples); values that can be negative (use line chart).
Preview
import { RibbonChart } from "insightcharts";
const data = [
{ year: "2019", Potatoes: 7.4, Carrots: 5.1, Onions: 4.2, Beans: 2.6, Squash: 1.2 },
{ year: "2020", Potatoes: 6.9, Carrots: 5.6, Onions: 3.8, Beans: 3.1, Squash: 2.3 },
{ year: "2021", Potatoes: 6.1, Carrots: 5.9, Onions: 3.1, Beans: 3.4, Squash: 3.9 },
{ year: "2022", Potatoes: 5.2, Carrots: 6.3, Onions: 2.9, Beans: 3.2, Squash: 5 },
{ year: "2023", Potatoes: 4.8, Carrots: 6, Onions: 2.4, Beans: 3.6, Squash: 6.1 },
{ year: "2024", Potatoes: 4.1, Carrots: 6.2, Onions: 2.2, Beans: 3.5, Squash: 6.8 },
];
export function Example() {
return (
<RibbonChart
data={data}
x="year"
y={["Potatoes", "Carrots", "Onions", "Beans", "Squash"]}
format={"{value} t"}
title="The squash harvest rose from 1.2 to 6.8 tonnes between 2019 and 2024"
subtitle="Harvest of five crops at one community farm, tonnes, 2019 to 2024, largest at the top each year"
note="Illustrative figures."
/>
);
}{
"type": "ribbon-chart",
"data": [
{
"year": "2019",
"Potatoes": 7.4,
"Carrots": 5.1,
"Onions": 4.2,
"Beans": 2.6,
"Squash": 1.2
},
{
"year": "2020",
"Potatoes": 6.9,
"Carrots": 5.6,
"Onions": 3.8,
"Beans": 3.1,
"Squash": 2.3
},
{
"year": "2021",
"Potatoes": 6.1,
"Carrots": 5.9,
"Onions": 3.1,
"Beans": 3.4,
"Squash": 3.9
},
{
"year": "2022",
"Potatoes": 5.2,
"Carrots": 6.3,
"Onions": 2.9,
"Beans": 3.2,
"Squash": 5
},
{
"year": "2023",
"Potatoes": 4.8,
"Carrots": 6,
"Onions": 2.4,
"Beans": 3.6,
"Squash": 6.1
},
{
"year": "2024",
"Potatoes": 4.1,
"Carrots": 6.2,
"Onions": 2.2,
"Beans": 3.5,
"Squash": 6.8
}
],
"x": "year",
"y": ["Potatoes", "Carrots", "Onions", "Beans", "Squash"],
"format": "{value} t",
"title": "The squash harvest rose from 1.2 to 6.8 tonnes between 2019 and 2024",
"subtitle": "Harvest of five crops at one community farm, tonnes, 2019 to 2024, largest at the top each year",
"note": "Illustrative figures."
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Composition
Used in
1 infographic uses ribbon chart.
Infographics
1Installation
$ pnpm dlx shadcn@latest add @insightcharts/ribbon-chartThe 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 { RibbonChart } from "insightcharts";Examples
Long data, one highlighted
import { RibbonChart } from "insightcharts";
const data = [
{ method: "Cash", year: "2016", share: 46 },
{ method: "Cash", year: "2018", share: 38 },
{ method: "Cash", year: "2020", share: 27 },
{ method: "Cash", year: "2022", share: 19 },
{ method: "Cash", year: "2024", share: 12 },
{ method: "Debit card", year: "2016", share: 31 },
{ method: "Debit card", year: "2018", share: 34 },
{ method: "Debit card", year: "2020", share: 37 },
{ method: "Debit card", year: "2022", share: 36 },
{ method: "Debit card", year: "2024", share: 33 },
{ method: "Credit card", year: "2016", share: 15 },
{ method: "Credit card", year: "2018", share: 16 },
{ method: "Credit card", year: "2020", share: 17 },
{ method: "Credit card", year: "2022", share: 16 },
{ method: "Credit card", year: "2024", share: 15 },
{ method: "Phone or watch", year: "2016", share: 2 },
{ method: "Phone or watch", year: "2018", share: 6 },
{ method: "Phone or watch", year: "2020", share: 14 },
{ method: "Phone or watch", year: "2022", share: 24 },
{ method: "Phone or watch", year: "2024", share: 36 },
{ method: "Voucher", year: "2016", share: 6 },
{ method: "Voucher", year: "2018", share: 6 },
{ method: "Voucher", year: "2020", share: 5 },
{ method: "Voucher", year: "2022", share: 5 },
{ method: "Voucher", year: "2024", share: 4 },
];
export function Example() {
return (
<RibbonChart
data={data}
series="method"
x="year"
y="share"
highlight="Phone or watch"
format={"{value}%"}
title="Phone and watch payments rose from 2% to 36% of till sales between 2016 and 2024"
subtitle="Share of till transactions by payment method at one grocery chain, 2016 to 2024"
note="Illustrative figures."
/>
);
}{
"type": "ribbon-chart",
"data": [
{ "method": "Cash", "year": "2016", "share": 46 },
{ "method": "Cash", "year": "2018", "share": 38 },
{ "method": "Cash", "year": "2020", "share": 27 },
{ "method": "Cash", "year": "2022", "share": 19 },
{ "method": "Cash", "year": "2024", "share": 12 },
{ "method": "Debit card", "year": "2016", "share": 31 },
{ "method": "Debit card", "year": "2018", "share": 34 },
{ "method": "Debit card", "year": "2020", "share": 37 },
{ "method": "Debit card", "year": "2022", "share": 36 },
{ "method": "Debit card", "year": "2024", "share": 33 },
{ "method": "Credit card", "year": "2016", "share": 15 },
{ "method": "Credit card", "year": "2018", "share": 16 },
{ "method": "Credit card", "year": "2020", "share": 17 },
{ "method": "Credit card", "year": "2022", "share": 16 },
{ "method": "Credit card", "year": "2024", "share": 15 },
{ "method": "Phone or watch", "year": "2016", "share": 2 },
{ "method": "Phone or watch", "year": "2018", "share": 6 },
{ "method": "Phone or watch", "year": "2020", "share": 14 },
{ "method": "Phone or watch", "year": "2022", "share": 24 },
{ "method": "Phone or watch", "year": "2024", "share": 36 },
{ "method": "Voucher", "year": "2016", "share": 6 },
{ "method": "Voucher", "year": "2018", "share": 6 },
{ "method": "Voucher", "year": "2020", "share": 5 },
{ "method": "Voucher", "year": "2022", "share": 5 },
{ "method": "Voucher", "year": "2024", "share": 4 }
],
"series": "method",
"x": "year",
"y": "share",
"highlight": "Phone or watch",
"format": "{value}%",
"title": "Phone and watch payments rose from 2% to 36% of till sales between 2016 and 2024",
"subtitle": "Share of till transactions by payment method at one grocery chain, 2016 to 2024",
"note": "Illustrative figures."
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Ten entities, one colour each
import { RibbonChart } from "insightcharts";
const data = [
{ tea: "Assam", year: "2020", sold: 40 },
{ tea: "Assam", year: "2021", sold: 38 },
{ tea: "Assam", year: "2022", sold: 36 },
{ tea: "Assam", year: "2023", sold: 33 },
{ tea: "Assam", year: "2024", sold: 30 },
{ tea: "Earl Grey", year: "2020", sold: 34 },
{ tea: "Earl Grey", year: "2021", sold: 35 },
{ tea: "Earl Grey", year: "2022", sold: 33 },
{ tea: "Earl Grey", year: "2023", sold: 34 },
{ tea: "Earl Grey", year: "2024", sold: 32 },
{ tea: "Darjeeling", year: "2020", sold: 28 },
{ tea: "Darjeeling", year: "2021", sold: 27 },
{ tea: "Darjeeling", year: "2022", sold: 25 },
{ tea: "Darjeeling", year: "2023", sold: 24 },
{ tea: "Darjeeling", year: "2024", sold: 22 },
{ tea: "Sencha", year: "2020", sold: 12 },
{ tea: "Sencha", year: "2021", sold: 18 },
{ tea: "Sencha", year: "2022", sold: 26 },
{ tea: "Sencha", year: "2023", sold: 34 },
{ tea: "Sencha", year: "2024", sold: 41 },
{ tea: "Chai", year: "2020", sold: 20 },
{ tea: "Chai", year: "2021", sold: 22 },
{ tea: "Chai", year: "2022", sold: 25 },
{ tea: "Chai", year: "2023", sold: 27 },
{ tea: "Chai", year: "2024", sold: 29 },
{ tea: "Oolong", year: "2020", sold: 16 },
{ tea: "Oolong", year: "2021", sold: 16 },
{ tea: "Oolong", year: "2022", sold: 17 },
{ tea: "Oolong", year: "2023", sold: 18 },
{ tea: "Oolong", year: "2024", sold: 19 },
{ tea: "Rooibos", year: "2020", sold: 14 },
{ tea: "Rooibos", year: "2021", sold: 15 },
{ tea: "Rooibos", year: "2022", sold: 15 },
{ tea: "Rooibos", year: "2023", sold: 16 },
{ tea: "Rooibos", year: "2024", sold: 16 },
{ tea: "Mint", year: "2020", sold: 10 },
{ tea: "Mint", year: "2021", sold: 12 },
{ tea: "Mint", year: "2022", sold: 13 },
{ tea: "Mint", year: "2023", sold: 15 },
{ tea: "Mint", year: "2024", sold: 18 },
{ tea: "Chamomile", year: "2020", sold: 9 },
{ tea: "Chamomile", year: "2021", sold: 9 },
{ tea: "Chamomile", year: "2022", sold: 10 },
{ tea: "Chamomile", year: "2023", sold: 10 },
{ tea: "Chamomile", year: "2024", sold: 11 },
{ tea: "Matcha", year: "2020", sold: 4 },
{ tea: "Matcha", year: "2021", sold: 7 },
{ tea: "Matcha", year: "2022", sold: 11 },
{ tea: "Matcha", year: "2023", sold: 16 },
{ tea: "Matcha", year: "2024", sold: 22 },
];
export function Example() {
return (
<RibbonChart
data={data}
series="tea"
x="year"
y="sold"
colorBy="series"
format={"{value} kg"}
title="Sencha sales rose from 12 kg to 41 kg between 2020 and 2024"
subtitle="Loose tea sold per year by one shop, ten teas, kilograms, 2020 to 2024, largest at the top each year"
note="Illustrative figures."
/>
);
}{
"type": "ribbon-chart",
"data": [
{ "tea": "Assam", "year": "2020", "sold": 40 },
{ "tea": "Assam", "year": "2021", "sold": 38 },
{ "tea": "Assam", "year": "2022", "sold": 36 },
{ "tea": "Assam", "year": "2023", "sold": 33 },
{ "tea": "Assam", "year": "2024", "sold": 30 },
{ "tea": "Earl Grey", "year": "2020", "sold": 34 },
{ "tea": "Earl Grey", "year": "2021", "sold": 35 },
{ "tea": "Earl Grey", "year": "2022", "sold": 33 },
{ "tea": "Earl Grey", "year": "2023", "sold": 34 },
{ "tea": "Earl Grey", "year": "2024", "sold": 32 },
{ "tea": "Darjeeling", "year": "2020", "sold": 28 },
{ "tea": "Darjeeling", "year": "2021", "sold": 27 },
{ "tea": "Darjeeling", "year": "2022", "sold": 25 },
{ "tea": "Darjeeling", "year": "2023", "sold": 24 },
{ "tea": "Darjeeling", "year": "2024", "sold": 22 },
{ "tea": "Sencha", "year": "2020", "sold": 12 },
{ "tea": "Sencha", "year": "2021", "sold": 18 },
{ "tea": "Sencha", "year": "2022", "sold": 26 },
{ "tea": "Sencha", "year": "2023", "sold": 34 },
{ "tea": "Sencha", "year": "2024", "sold": 41 },
{ "tea": "Chai", "year": "2020", "sold": 20 },
{ "tea": "Chai", "year": "2021", "sold": 22 },
{ "tea": "Chai", "year": "2022", "sold": 25 },
{ "tea": "Chai", "year": "2023", "sold": 27 },
{ "tea": "Chai", "year": "2024", "sold": 29 },
{ "tea": "Oolong", "year": "2020", "sold": 16 },
{ "tea": "Oolong", "year": "2021", "sold": 16 },
{ "tea": "Oolong", "year": "2022", "sold": 17 },
{ "tea": "Oolong", "year": "2023", "sold": 18 },
{ "tea": "Oolong", "year": "2024", "sold": 19 },
{ "tea": "Rooibos", "year": "2020", "sold": 14 },
{ "tea": "Rooibos", "year": "2021", "sold": 15 },
{ "tea": "Rooibos", "year": "2022", "sold": 15 },
{ "tea": "Rooibos", "year": "2023", "sold": 16 },
{ "tea": "Rooibos", "year": "2024", "sold": 16 },
{ "tea": "Mint", "year": "2020", "sold": 10 },
{ "tea": "Mint", "year": "2021", "sold": 12 },
{ "tea": "Mint", "year": "2022", "sold": 13 },
{ "tea": "Mint", "year": "2023", "sold": 15 },
{ "tea": "Mint", "year": "2024", "sold": 18 },
{ "tea": "Chamomile", "year": "2020", "sold": 9 },
{ "tea": "Chamomile", "year": "2021", "sold": 9 },
{ "tea": "Chamomile", "year": "2022", "sold": 10 },
{ "tea": "Chamomile", "year": "2023", "sold": 10 },
{ "tea": "Chamomile", "year": "2024", "sold": 11 },
{ "tea": "Matcha", "year": "2020", "sold": 4 },
{ "tea": "Matcha", "year": "2021", "sold": 7 },
{ "tea": "Matcha", "year": "2022", "sold": 11 },
{ "tea": "Matcha", "year": "2023", "sold": 16 },
{ "tea": "Matcha", "year": "2024", "sold": 22 }
],
"series": "tea",
"x": "year",
"y": "sold",
"colorBy": "series",
"format": "{value} kg",
"title": "Sencha sales rose from 12 kg to 41 kg between 2020 and 2024",
"subtitle": "Loose tea sold per year by one shop, ten teas, kilograms, 2020 to 2024, largest at the top each year",
"note": "Illustrative figures."
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Stress: 7 entities, 8 periods, thin bands
import { RibbonChart } from "insightcharts";
const data = [
{ club: "Rowing club", season: "2017", medals: 14 },
{ club: "Rowing club", season: "2018", medals: 12 },
{ club: "Rowing club", season: "2019", medals: 15 },
{ club: "Rowing club", season: "2020", medals: 11 },
{ club: "Rowing club", season: "2021", medals: 9 },
{ club: "Rowing club", season: "2022", medals: 8 },
{ club: "Rowing club", season: "2023", medals: 7 },
{ club: "Rowing club", season: "2024", medals: 6 },
{ club: "Athletics club", season: "2017", medals: 9 },
{ club: "Athletics club", season: "2018", medals: 11 },
{ club: "Athletics club", season: "2019", medals: 10 },
{ club: "Athletics club", season: "2020", medals: 13 },
{ club: "Athletics club", season: "2021", medals: 16 },
{ club: "Athletics club", season: "2022", medals: 18 },
{ club: "Athletics club", season: "2023", medals: 17 },
{ club: "Athletics club", season: "2024", medals: 21 },
{ club: "Swimming club", season: "2017", medals: 11 },
{ club: "Swimming club", season: "2018", medals: 10 },
{ club: "Swimming club", season: "2019", medals: 12 },
{ club: "Swimming club", season: "2020", medals: 12 },
{ club: "Swimming club", season: "2021", medals: 11 },
{ club: "Swimming club", season: "2022", medals: 13 },
{ club: "Swimming club", season: "2023", medals: 15 },
{ club: "Swimming club", season: "2024", medals: 14 },
{ club: "Cycling club", season: "2017", medals: 3 },
{ club: "Cycling club", season: "2018", medals: 4 },
{ club: "Cycling club", season: "2019", medals: 6 },
{ club: "Cycling club", season: "2020", medals: 9 },
{ club: "Cycling club", season: "2021", medals: 12 },
{ club: "Cycling club", season: "2022", medals: 11 },
{ club: "Cycling club", season: "2023", medals: 13 },
{ club: "Cycling club", season: "2024", medals: 12 },
{ club: "Fencing club", season: "2017", medals: 6 },
{ club: "Fencing club", season: "2018", medals: 5 },
{ club: "Fencing club", season: "2019", medals: 4 },
{ club: "Fencing club", season: "2020", medals: 4 },
{ club: "Fencing club", season: "2021", medals: 3 },
{ club: "Fencing club", season: "2022", medals: 3 },
{ club: "Fencing club", season: "2023", medals: 2 },
{ club: "Fencing club", season: "2024", medals: 2 },
{ club: "Judo club", season: "2017", medals: 2 },
{ club: "Judo club", season: "2018", medals: 3 },
{ club: "Judo club", season: "2019", medals: 3 },
{ club: "Judo club", season: "2020", medals: 2 },
{ club: "Judo club", season: "2021", medals: 4 },
{ club: "Judo club", season: "2022", medals: 5 },
{ club: "Judo club", season: "2023", medals: 4 },
{ club: "Judo club", season: "2024", medals: 6 },
{ club: "Archery club", season: "2017", medals: 1 },
{ club: "Archery club", season: "2018", medals: 1 },
{ club: "Archery club", season: "2019", medals: 2 },
{ club: "Archery club", season: "2020", medals: 1 },
{ club: "Archery club", season: "2021", medals: 1 },
{ club: "Archery club", season: "2022", medals: 2 },
{ club: "Archery club", season: "2023", medals: 1 },
{ club: "Archery club", season: "2024", medals: 1 },
];
export function Example() {
return (
<RibbonChart
data={data}
series="club"
x="season"
y="medals"
title="The athletics club's medals rose from 9 in 2017 to 21 in 2024"
subtitle="Medals won per season by seven clubs in one regional league, 2017 to 2024"
note="Illustrative figures."
/>
);
}{
"type": "ribbon-chart",
"data": [
{ "club": "Rowing club", "season": "2017", "medals": 14 },
{ "club": "Rowing club", "season": "2018", "medals": 12 },
{ "club": "Rowing club", "season": "2019", "medals": 15 },
{ "club": "Rowing club", "season": "2020", "medals": 11 },
{ "club": "Rowing club", "season": "2021", "medals": 9 },
{ "club": "Rowing club", "season": "2022", "medals": 8 },
{ "club": "Rowing club", "season": "2023", "medals": 7 },
{ "club": "Rowing club", "season": "2024", "medals": 6 },
{ "club": "Athletics club", "season": "2017", "medals": 9 },
{ "club": "Athletics club", "season": "2018", "medals": 11 },
{ "club": "Athletics club", "season": "2019", "medals": 10 },
{ "club": "Athletics club", "season": "2020", "medals": 13 },
{ "club": "Athletics club", "season": "2021", "medals": 16 },
{ "club": "Athletics club", "season": "2022", "medals": 18 },
{ "club": "Athletics club", "season": "2023", "medals": 17 },
{ "club": "Athletics club", "season": "2024", "medals": 21 },
{ "club": "Swimming club", "season": "2017", "medals": 11 },
{ "club": "Swimming club", "season": "2018", "medals": 10 },
{ "club": "Swimming club", "season": "2019", "medals": 12 },
{ "club": "Swimming club", "season": "2020", "medals": 12 },
{ "club": "Swimming club", "season": "2021", "medals": 11 },
{ "club": "Swimming club", "season": "2022", "medals": 13 },
{ "club": "Swimming club", "season": "2023", "medals": 15 },
{ "club": "Swimming club", "season": "2024", "medals": 14 },
{ "club": "Cycling club", "season": "2017", "medals": 3 },
{ "club": "Cycling club", "season": "2018", "medals": 4 },
{ "club": "Cycling club", "season": "2019", "medals": 6 },
{ "club": "Cycling club", "season": "2020", "medals": 9 },
{ "club": "Cycling club", "season": "2021", "medals": 12 },
{ "club": "Cycling club", "season": "2022", "medals": 11 },
{ "club": "Cycling club", "season": "2023", "medals": 13 },
{ "club": "Cycling club", "season": "2024", "medals": 12 },
{ "club": "Fencing club", "season": "2017", "medals": 6 },
{ "club": "Fencing club", "season": "2018", "medals": 5 },
{ "club": "Fencing club", "season": "2019", "medals": 4 },
{ "club": "Fencing club", "season": "2020", "medals": 4 },
{ "club": "Fencing club", "season": "2021", "medals": 3 },
{ "club": "Fencing club", "season": "2022", "medals": 3 },
{ "club": "Fencing club", "season": "2023", "medals": 2 },
{ "club": "Fencing club", "season": "2024", "medals": 2 },
{ "club": "Judo club", "season": "2017", "medals": 2 },
{ "club": "Judo club", "season": "2018", "medals": 3 },
{ "club": "Judo club", "season": "2019", "medals": 3 },
{ "club": "Judo club", "season": "2020", "medals": 2 },
{ "club": "Judo club", "season": "2021", "medals": 4 },
{ "club": "Judo club", "season": "2022", "medals": 5 },
{ "club": "Judo club", "season": "2023", "medals": 4 },
{ "club": "Judo club", "season": "2024", "medals": 6 },
{ "club": "Archery club", "season": "2017", "medals": 1 },
{ "club": "Archery club", "season": "2018", "medals": 1 },
{ "club": "Archery club", "season": "2019", "medals": 2 },
{ "club": "Archery club", "season": "2020", "medals": 1 },
{ "club": "Archery club", "season": "2021", "medals": 1 },
{ "club": "Archery club", "season": "2022", "medals": 2 },
{ "club": "Archery club", "season": "2023", "medals": 1 },
{ "club": "Archery club", "season": "2024", "medals": 1 }
],
"series": "club",
"x": "season",
"y": "medals",
"title": "The athletics club's medals rose from 9 in 2017 to 21 in 2024",
"subtitle": "Medals won per season by seven clubs in one regional league, 2017 to 2024",
"note": "Illustrative figures."
}Render with import { Insight } from "insightcharts" and <Insight spec={spec} />. Nested specs resolve by name; nothing else to import.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| xrequired | string | Period field: one column of the ribbon per distinct value, in data order. | |
| yrequired | string | string[] | Value field (long data), or one column per entity (wide data). Band thickness; negative values are drawn as zero. | |
| series | string | Entity field, for long data. | |
| values | boolean | true | Print each value inside its band at every period where it fits. |
| labels | "both" | "end" | Entity names at both ends, or only at the end. Default: both, end only on narrow screens. | |
| names | Record<string, string> | Display names for entity keys. | |
| colorBy | "auto" | "series" | "none" | "auto" | auto: the largest entities take the theme's colours and any past the palette size (at most 8) are grey. series: every band gets its own colour, the extra ones derived from the theme's own. none: every band in the accent. |
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>. |