ChartLegend
Interactive, keyboard-navigable.
npx shadcn add @lopifi/chart-legendHow it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
Interactive: click to isolate a series, keyboard-navigable, aria-pressed state. Positioned below on phone as a wrapping row. Series colors are assigned by a stable key hash, never by array index, so a category is the same color in the dashboard and the drill-down.
More in Dashboard & charts
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section ChartLegend renders in, the calculators behind its figures, and the ledger payloads that feed it.
- ChartLegend, runningThe charts showcase — live, with theme, density, grayscale and reduced-motion switches.
- Dashboard & chartsWe wrap a charting engine (Recharts, or visx where we need more control) instead of building one. What we add is everything a chart library doesn't know about money. Specs for 11 React components: DashboardShell, KpiRow, MoneyChart, MoneyBarChart and 7 more.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when Dashboard & charts changes
Your copy doesn’t update itself when we fix something here.
- One email when a Dashboard & charts component needs a migration
- Nothing when nothing changes
Or install it now