Charts that feel alive.
Heatmaps
- 0
- 1–2
- 3–4
- 5–6
- 7+
| Week of | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| Jul 27 | 7 | 6 | 8 | 7 | 7 | 0 | 0 |
| Aug 3 | 5 | 3 | 6 | 2 | 2 | 0 | 2 |
| Aug 10 | 1 | 6 | 1 | 6 | 4 | 0 | 0 |
| Aug 17 | 4 | 6 | 4 | 7 | 3 | 2 | 0 |
| Aug 24 | 0 | 8 | 5 | 1 | 3 | 0 | 1 |
| Aug 31 | 2 | 6 | 7 | 4 | 2 | 2 | 1 |
| Sep 7 | 5 | 5 | 3 | 5 | 2 | 0 | 0 |
| Sep 14 | 3 | 1 | 5 | 5 | 1 | 1 | 1 |
| Sep 21 | 6 | 4 | 7 | 5 | 4 | 1 | 1 |
| Sep 28 | 5 | 5 | 5 | 3 | 3 | 2 | 1 |
| Oct 5 | 2 | 7 | 1 | 3 | 4 | 1 | 1 |
| Oct 12 | 4 |
Calendar heatmap
- Below 45%
- 45–54%
- 55–64%
- 65% and above
| Signup month | Signups | Month 1 | Month 2 | Month 3 | Month 4 | Month 5 |
|---|---|---|---|---|---|---|
| Apr 2026 | 1240 | 64 | 52 | 47 | 44 | 42 |
| May 2026 | 1385 | 66 | 54 | 49 | 45 | |
| Jun 2026 | 1312 | 63 | 51 | 46 | ||
| Jul 2026 | 1478 | 68 | 56 | |||
| Aug 2026 | 1590 | 70 |
Heatmap matrix
From gallery to app
Installation
Usage
Build the definition with TanStack Charts. Show it with Chart, in a ChartFrame.
traffic-chart.tsx
Composition
ChartFrameSets the series colors and the tooltip styles.
ChartCaptionOptionalChartTitleChartValueOptionalChartDescriptionOptional
ChartActionOptionalShows beside the caption. Moves below it on narrow screens.
ChartOwns the motion. Accepts the TanStack core Chart props.
ChartCenterOptionalCovers the plot and centers its content, such as a donut total.
ChartLegendOptionalChartLegendItemRepeats
ChartTableScreen readers only.
Motion
- When a chart scrolls into view, it fades in. Its bar, line, area, and arc marks grow from their baseline.
- A chart that the server renders on screen does not move when the page loads. A chart that mounts later, for example after a link, grows in.
- When the data changes, each mark moves to its new value. Give each mark a stable
key.
To change the motion of one chart, give it a renderer.
revenue-chart.tsx
To stop the motion, use the static SVG renderer.
revenue-chart.tsx
Theming
Charts use the colors --chart-1 to --chart-6. Set them for light and dark mode.
globals.css
To change one chart, set a color on its frame.
chart.tsx
Accessibility
ariaLabelnames the chart for screen readers.ChartTablegives screen readers the exact values.- Press Tab to focus a chart that has tooltips. Use the arrow keys to move between points.
- Press Enter to pin a tooltip. Press Escape to close it.
- When reduced motion is on, charts show at once and do not move.
API reference
TanStack Charts API (opens in a new tab)All parts also accept className and native HTML attributes.
ChartFrame
- --ts-chart-1: color = var(--chart-1)
- The color of the first series. --ts-chart-2 to --ts-chart-6 set the other series. Set them in style to change the colors of one chart.
ChartAction
- children: ReactNode
- Controls for the chart, such as a period toggle.
Chart
Also accepts the props of the TanStack core Chart, such as definition, ariaLabel, height, and initialWidth.
- renderer: ChartRenderer = chartMotion
- Draws and animates the chart. chartMotion is a TanStack motion renderer with a spring.
- children: ReactNode
- Content on top of the plot, such as ChartCenter.
ChartLegendItem
- color: stringRequired
- The series color. Use the same value as the mark.
- swatch: "square" | "line" | "dashed" = "square"
- The swatch shape. Use line for a line series and dashed for a dashed line.
ChartTable
- caption: stringRequired
- Names the table for screen readers.
- columns: string[]Required
- Column headings. The first column labels each row.
- rows: (string | number)[][]Required
- The exact values. The table is visible to screen readers only.