/

Heatmap

Show density or intensity across two dimensions using color. Great for time patterns, correlation matrices, and activity tracking.

Usage

example.tsx
import { HeatmapChart } from "@chartts/react"

<HeatmapChart
  data={activityData}
  x="day"
  y="hour"
  value="commits"
  colorScale={["#0f172a", "#06b6d4"]}
/>

Props

PropTypeDescription
dataT[]Array of data objects
xkeyof TKey for x categories
ykeyof TKey for y categories
valuekeyof TKey for cell values
colorScalestring[]Color range from low to high
cellRadiusnumberCell border radius. Default: 2

Features

  • Configurable color scales
  • Cell labels
  • Tooltip with values
  • Responsive cell sizing
  • Row/column sorting
  • GitHub-style contribution grid

Other Charts