Heatmap Chart

Three powerful heatmap variants — grid with crosshair highlight, radial polar clock, and a stock-market treemap where cell size encodes market cap and color encodes price change.

Grid + Cross-Highlight
Radial / Polar Clock
Stock Treemap
Color Interpolation
Color Legend
Responsive
TypeScript

Three Variants — Switch Live

Grid, Radial, and Stock with different datasets — all from the same component

Loading…
Variant:
Color:

Installation

Get started with the HeatmapChart component in just a few steps.

Quick Install
bash
npx mario-charts@latest add heatmap
Zero Lock-in Philosophy
The component is fully yours to own, modify, and customize.

Examples

Dedicated examples for each variant.

Stock Market Treemap

Cell area = market cap, color = daily % change. Negative red, positive green — just like Finviz.

Loading…

Radial / Polar Clock — Hourly Traffic

Cyclical patterns rendered as concentric rings. Each angle = hour, each ring = day of week.

Loading…

Grid — Cross-Highlight on Hover

Hover any cell to see its entire row and column dim — a crosshair effect not found in standard chart libraries.

Loading…

Loading State

Error State

Chart Error
Failed to load data

Empty State

No Data
There's no data to display

API Reference

Complete TypeScript interface with all available props and configurations.

PropTypeDefaultDescription
datarequired
readonly T[]Array of data objects
xrequired
keyof TColumn / angular axis / stock label key
yrequired
keyof TRow / ring axis key (not used for stock)
valuerequired
keyof TNumeric value key — color intensity for grid/radial, % change for stock
weight
keyof TArea weight key for stock treemap (e.g. marketCap). Defaults to equal area.
variant
'grid' | 'radial' | 'stock''grid'grid: standard with cross-highlight; radial: polar clock rings; stock: treemap sized by weight
colorScheme
'blue' | 'green' | 'amber' | 'purple' | 'diverging''blue'Built-in color scheme. Stock variant uses red/green regardless unless colorFrom/colorTo are set.
colorFrom
stringOverride low-value color (hex). For stock: overrides the negative/red end.
colorTo
stringOverride high-value color (hex). For stock: overrides the positive/green end.
showLabels
booleantrueShow axis labels
showLegend
booleanfalseShow color legend swatch
cellRadius
number4Cell border radius in pixels (grid variant)
height
number320Height of the chart in pixels
loading
booleanfalseShow loading skeleton state
error
string | nullnullError message to display
animation
booleantrueEnable entrance animation
onClick
(item: T, colLabel: string, rowLabel: string) => voidCallback on cell click
className
stringAdditional CSS classes for the container