Components
Chart
Themed chart components built on Recharts. Includes Line, Bar, and Area variants with consistent styling and custom tooltips.
Line Chart
Use ComitorLineChart for trend data over time.
Bar Chart
Use ComitorBarChart for categorical comparisons.
Area Chart
Use ComitorAreaChart for cumulative or volume data.
Stacked Bar
Pass stacked to stack multiple series.
Color palette
The CHART_COLORS export provides themed colors that use CSS variables.
goldgoldLighttealnavyredgreengrayProps (shared)
| Prop | Type | Default | Description |
|---|---|---|---|
datarequired | Record<string, unknown>[] | — | Array of data points. |
xAxisKeyrequired | string | — | Key for X-axis values. |
seriesrequired | DataSeries[] | — | Array of { key, name?, color? } for each line/bar/area. |
height | number | string | 300 | Chart container height. |
showGrid | boolean | true | Show cartesian grid. |
showLegend | boolean | false | Show legend below chart. |
valueFormatter | (value: number) => string | — | Format tooltip values. |
Accessibility
- Charts are visual — provide a text summary or data table alternative for screen readers.
- Tooltips are keyboard-accessible when navigating data points.
- Use meaningful color contrast — the default palette meets WCAG AA for data visualization.