Chart
ImplementedDependency-free line/bar/donut/sparkline chart — hand-rolled token-driven SVG with a visually-hidden data table (WCAG 1.1.1). No chart library; for recharts-based organisms see StackedBarChart / TimeSeriesAreaChart.
components/organisms/Chart/Chart.tsxChart component. The sr-only data-table strings (srTableCaption / srLabelHeader / srValueHeader) default to English — French consumers should pass localized strings (e.g. "Données du graphique" / "Étiquette" / "Valeur").
Chart
design-system
Chart component preview and API reference.
| Étiquette | Valeur |
|---|---|
| Lun | 42 |
| Mar | 68 |
| Mer | 55 |
| Jeu | 91 |
| Ven | 73 |
| Sam | 120 |
| Dim | 88 |
Props
Chart
type'line' | 'bar' | 'donut' | 'sparkline'—Chart type
dataChartPoint[]—Chart data points
titlestring—Chart title
heightnumber300Chart height in pixels
colorsstring[]—Chart colors
ariaLabelstring—Overrides the auto-generated accessible name. Default: `title: ` prefix + every data point (`label value`) spelled out — pass a concise summary instead.
srTableCaptionstring"Chart data"Caption for the visually-hidden data table (screen readers). French consumers should pass localized string.
srLabelHeaderstring"Label"Header for the label column in the sr-only data table. French consumers should pass localized string.
srValueHeaderstring"Value"Header for the value column in the sr-only data table. French consumers should pass localized string.
<Chart />Accessibility
ARIA
2 rulesvalidation
1 ruleUsage
Import
import { Chart } from "@epasslive/design-system"Example 1
<Chart type="line" data={data} />Example 2
<Chart type="bar" data={data} title="Sales" />Anti-patterns
— Do not fetch data directly in organisms
— Avoid tight coupling to specific data sources