Skip to content

Chart

Bar, line and area charts on the chart tokens. Every chart has a title and a summary; more than one series gets a legend, and the tooltip names each series. Focus a chart and use the arrow keys to move between points.

Sourcecomponents/chart.tsx
Visits and sign-ups, January to June

Visits peaked at 305 in February; sign-ups peaked at 200 the same month.

Monthly revenue, January to June

Revenue grew every month but March, from $4,200 to $7,100.

Usage

When to use

Use when

Showing a trend or a comparison: bars, lines, areas. Always give a title and a one-line description; colors from chart-1…chart-5; a legend when there's more than one series. Requires recharts and react-is

Don’t use when

Exact values the user must read or compare (use Table, or put one beside the chart); a single number (show the number); color as the only way to tell series apart