Krizaka UI
Krizaka UI
ComponentsData display

Calendar heatmap

One cell a day over a year, weeks in columns, in one sequential hue: streaks, rhythms and gaps at a glance.

Web · ✓Mobile · ✗ to buildDesktop · ✓BetaCharts
Support level
Beta
Size
Not measured
Who uses it
No live product imports it yet
import { CalendarHeatmap } from "@krizaka/charts/heatmap";

Web only — React, from @krizaka/charts/heatmap. Beta: its API may still change in a minor version.

  • Mobile · ✗ to build. Advanced tier: no phone screen needs it yet. issue #280

Why it is here. A creator's activity by day (PS-C).

When to use

  • A daily habit or activity over months: publications, contributions, active days.

When not to use

  • Two categorical dimensions (weekday × hour).Use instead: Heatmap
  • A trend over time.Use instead: Line chart

Installation

Install

npm install @krizaka/charts

Import

import { CalendarHeatmap } from "@krizaka/charts/heatmap";

Examples

A year of publishing

A creator's videos published per day over a year.

Props

PropTypeDefaultDescription
datarequiredreadonly T[]—One row per day (days without a row read as nothing).
daterequiredstring | ((datum: T, index: number) => unknown)—The field of the day: an ISO date (2026-04-12), a Date or an epoch.
valuerequiredstring | ((datum: T, index: number) => number)—The field of the day's value.
actionsMenuboolean—The ⋯ actions menu of the kit. false: the former “Show data” and export buttons, drawn in line. Default true.
brandBrandId—The brand whose palette the charts use. Without it, a chart follows a .brand-<id> ancestor, else Krizaka. Set it when the app loads a brand stylesheet on :root (@krizaka/tokens/brands/sovkora.css).
classNamestring—A class on the figure (layout: margins, grid placement).
dataTableboolean—“View as table” in the actions menu (the table is in the page for screen readers either way). Default true.
descriptionReactNode—A sentence under the title: the period, the unit, the source.
emptyReactNode—What to show when there is nothing to draw (default: the empty label). An EmptyState of @krizaka /ui fits.
errorReactNode—The data could not be loaded: true says the default words, a node says yours (a retry button…).
exportableboolean | readonly ExportFormat[]—The downloads of the actions menu: all three by default, or the formats you want, or false for none.
formatValueFormat—How the values are written.
heightnumber—The height of the plot in pixels. Default 280 (a sparkline: 32).
hideTitleboolean—Visually hide the title (it stays the chart's accessible name): a card that already has its heading.
idstring—The id of the figure.
insightReactNode—One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.
labelsChartLabelsInput—The words, translated: the buttons, the states, the written summary.
liveboolean—Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.
loadingboolean—The data is on its way: a skeleton of the chart, announced once.
localeLocale—The locale of every figure and date ("fr-FR"). Default "en-US".
rangereadonly [string, string]—The first and last days shown. Default: the year before the last day of the data.
rendererRenderer—svg (default): sharp, exportable as SVG. canvas: for tens of thousands of marks.
styleCSSProperties—Inline style on the figure (layout only: colours come from the tokens).
summary"hidden" | "visible"—The written summary: read by screen readers only ("hidden", default), or shown under the chart ("visible").
summaryTextstring—Your own summary instead of the generated one (still read first by screen readers).
titlestring—What the chart shows, in a few words: its accessible name, and its heading unless hideTitle. Inside a ChartCard, the card's title is the default.
valueLabelstring—The header of the values in the data table.

Accessibility

  • The plot is a group named by the title and described by a summary written from the data, read before anything else.
  • The data table is always in the page for assistive technology; “Show data” reveals it for everyone.
  • The engine (ECharts core and this one chart type) loads when the chart nears the screen; a skeleton of the same height holds its place, so nothing shifts.
  • Under reduced motion the chart is drawn without animation.
  • The summary says the total, the busiest day and the number of active days.

Keyboard

KeysAction
TabMoves the focus to the plot (one tab stop), then to the data and export buttons.
Arrow keysWalk the items one by one: each is announced and highlighted, its tooltip shown.
Home / EndJump to the first or the last item.
EscHides the tooltip and clears the highlight.

Best practices

  • Pass ISO dates (2026-04-12): the month and weekday names come from the locale.
  • Leave days without activity out of the data: they are drawn empty.

Generated from the code of @krizaka/ui 5.3.4: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page