Skip to content

Calendar Heatmap

ChartsSince 0.13.0

Accessible SVG calendar heatmap: one square per day in a week-by-weekday grid (weeks as columns, weekdays as rows starting at the locale’s first day of the week) over a calendar year or a range, with month labels. Fills encode values in discrete steps listed in the legend. With a business calendar, non-working days get a dashed outline and holidays a dot and their name, so a quiet weekend never reads as missing activity. Day and week keyboard navigation, value tooltips, a summary, and a data table are built in.

  • Business calendarWeekends get a dashed outline and holidays a dot and their name.
  • Locale week startRows start on the locale's first day of the week, or one you choose.
  • Day and week keysUp and Down move by day, Left and Right by week, Page keys by month.
  • Color stepsDiscrete steps listed in the legend, with exact values in tooltips and the table.

Use it for

  • Daily activity over a year: absences, commits, sales, support tickets.
  • Spotting weekly and seasonal patterns, and how they relate to working days and holidays.

Use something else for

  • Exact comparison of a few days: use Bar Chart.
  • Hourly patterns: use Heatmap (weekday by hour).
  • More than three years: aggregate by week or month.
Anatomy
<div class="aui-chart aui-calendar-heatmap">
<div class="aui-chart__header">title, description</div>
<ul class="aui-chart__legend" aria-label="Legend">No value, steps, Non-working day, Holiday</ul>
<div class="aui-chart__body">
<svg class="aui-chart__svg" role="group" aria-roledescription="calendar heatmap" aria-labelledby="T" aria-describedby="S">
<g class="aui-chart__axis" aria-hidden="true">month and weekday labels</g>
<g class="aui-calendar-heatmap__cells">
<rect class="aui-calendar-heatmap__cell aui-chart__series--c1 aui-calendar-heatmap__level--60 aui-chart__mark" role="img" aria-label="Mon, Jan 5, 2026: 3" tabindex="0"/>
<rect class="aui-calendar-heatmap__cell aui-calendar-heatmap__cell--empty aui-calendar-heatmap__cell--off aui-chart__mark" role="img" aria-label="Sat, Jan 3, 2026: No value, Non-working day"/>
</g>
<g class="aui-calendar-heatmap__holidays" aria-hidden="true"><circle class="aui-calendar-heatmap__dot"/></g>
</svg>
<div class="aui-chart__tooltip" aria-hidden="true" hidden/>
</div>
<p class="aui-chart__summary" hidden/> <div class="aui-chart__data">Show data table, table</div>
</div>

Use the bar above each frame to switch theme, density, direction, and locale.

Calendar Heatmap in the Advanced visualizations showcase

Section titled “Calendar Heatmap in the Advanced visualizations showcase”

The part of the Advanced visualizations showcase that uses Calendar Heatmap. Change its options, use it with the keyboard, and watch the event log; the link in the frame opens the full showcase. The bar above the frame switches theme, density, direction, and locale.

Showcase source
// Advanced visualizations showcase: an illustrative share price as candles on a trading-day axis, team collaboration as a network
// graph, and absences in a calendar heatmap with holidays. All data is small, inline, and
// made up. Style and animation are switchable; events are logged.
import { plainDate, type PlainDate } from '@absoluteui/core';
import { createBusinessCalendar } from '@absoluteui/components/business-calendar';
import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
import { CandlestickChart, type CandlestickPoint } from '@absoluteui/components/candlestick-chart';
import { NetworkGraph } from '@absoluteui/components/network-graph';
import { action, chartControls, chartLook, choice, createShowcase, hostIn, section, toggle } from './kit.js';
const sc = createShowcase({
title: 'Advanced visualizations',
description: 'Three special charts on the same chart layer: prices, networks, and calendars. Each one works with the keyboard, has a data table, and follows the theme.',
});
const calendar = createBusinessCalendar({
holidays: [
{ date: plainDate(2026, 1, 1), name: 'New Year' },
{ date: plainDate(2026, 4, 3), name: 'Good Friday' },
{ date: plainDate(2026, 4, 6), name: 'Easter Monday' },
{ date: plainDate(2026, 5, 1), name: 'Labour Day' },
],
});
// 1. Share price on trading days (weekends and the holidays above are skipped).
const s2 = section(sc, 'Share price', ['candlestick-chart']);
const sessions: CandlestickPoint[] = [];
{
let date: PlainDate = plainDate(2026, 3, 2);
let price = 48;
for (let i = 0; i < 90; i++) {
const open = price;
const close = Math.round((open * (1 + Math.sin(i / 5) * 0.015 + Math.cos(i / 2) * 0.01 + 0.002)) * 100) / 100;
const spread = open * 0.012;
sessions.push({ date, open, close, high: Math.round((Math.max(open, close) + spread) * 100) / 100, low: Math.round((Math.min(open, close) - spread) * 100) / 100, volume: 40000 + ((i * 7919) % 30000) });
price = close;
date = calendar.addWorkingDays(date, 1);
}
}
const candles = CandlestickChart.create(hostIn(s2), {
label: 'Share price (illustrative)',
description: 'Trading days only: weekends and public holidays take no space. Zoom with the toolbar, + and -, or Ctrl and the wheel.',
data: sessions,
businessCalendar: calendar,
movingAverages: [{ period: 10 }, { period: 30, style: { dash: 'dashed' } }],
valueFormat: { style: 'currency', currency: 'EUR' },
zoom: true,
zoomRange: { from: 40, to: 89 },
height: 340,
});
const grid = hostIn(sc.stage);
grid.className = 'sc-grid';
const networkSection = section(sc, 'Team collaboration', ['network-graph']);
const absenceSection = section(sc, 'Absences', ['calendar-heatmap']);
grid.append(networkSection, absenceSection);
// 2. Team collaboration.
const network = NetworkGraph.create(hostIn(networkSection), {
label: 'Team collaboration',
description: 'Drag a person to pin them, or press Shift and an arrow key. Arrow keys move to a connected person.',
nodes: [
{ id: 'ana', label: 'Ana', group: 'design', value: 6 },
{ id: 'ben', label: 'Ben', group: 'eng', value: 9 },
{ id: 'chi', label: 'Chi', group: 'eng', value: 7 },
{ id: 'dev', label: 'Dev', group: 'product', value: 8 },
{ id: 'eli', label: 'Eli', group: 'eng', value: 4 },
{ id: 'fay', label: 'Fay', group: 'design', value: 3 },
{ id: 'gus', label: 'Gus', group: 'data', value: 5 },
{ id: 'hal', label: 'Hal', group: 'data', value: 2 },
{ id: 'ivy', label: 'Ivy', group: 'product', value: 4 },
{ id: 'jon', label: 'Jon' },
],
edges: [
{ source: 'ana', target: 'ben', weight: 4 },
{ source: 'ana', target: 'fay', weight: 3 },
{ source: 'ben', target: 'chi', weight: 6 },
{ source: 'ben', target: 'eli', weight: 2 },
{ source: 'chi', target: 'dev', weight: 3 },
{ source: 'dev', target: 'ana', weight: 2 },
{ source: 'dev', target: 'ivy', weight: 4 },
{ source: 'gus', target: 'chi', weight: 2 },
{ source: 'gus', target: 'hal', weight: 3 },
{ source: 'ivy', target: 'gus' },
],
groups: [
{ id: 'design', label: 'Design' },
{ id: 'eng', label: 'Engineering' },
{ id: 'product', label: 'Product' },
{ id: 'data', label: 'Data' },
],
height: 340,
});
// 3. Absences over the first half of the year.
const absences = CalendarHeatmap.create(hostIn(absenceSection), {
label: 'Absences, January to June',
description: 'Dashed squares are weekends; dots are public holidays.',
from: plainDate(2026, 1, 1),
to: plainDate(2026, 6, 30),
data: Array.from({ length: 181 }, (_, i) => {
const date = calendar.addWorkingDays(plainDate(2025, 12, 31), 1 + Math.floor(i * 0.7));
return { date, value: (i * 13) % 7 };
}),
businessCalendar: calendar,
colorScale: { color: 4, steps: 4 },
height: 200,
});
for (const [name, chart] of [
['candles', candles],
['network', network],
['calendar', absences],
] as const) {
sc.listen(chart.host, ['aui-series-toggle', 'aui-zoom', 'aui-point-click', 'aui-node-pin'], name);
}
chartControls(sc, [candles, network, absences]);
chartLook(sc, [candles, network, absences]);
choice(
sc,
'Candles',
[
{ value: 'candle', label: 'Candles' },
{ value: 'ohlc', label: 'OHLC bars' },
],
'candle',
(type) => {
candles.update({ type });
},
['candlestick-chart'],
);
toggle(sc, 'Trading days only', true, (on) => {
candles.update({ businessCalendar: on ? calendar : null, zoomRange: null });
}, ['candlestick-chart']);
action(sc, 'Re-run network layout', () => {
network.relayout();
}, ['network-graph']);

A year of absences with a business calendar

Section titled “A year of absences with a business calendar”
import { plainDate } from '@absoluteui/core';
import { createBusinessCalendar } from '@absoluteui/components/business-calendar';
import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
const host = document.createElement('div');
document.body.append(host);
CalendarHeatmap.create(host, {
label: 'Absences in 2026',
year: 2026,
data: [
{ date: plainDate(2026, 1, 5), value: 3 },
{ date: plainDate(2026, 1, 6), value: 5 },
{ date: plainDate(2026, 2, 10), value: 1 },
],
businessCalendar: createBusinessCalendar({ holidays: [{ date: plainDate(2026, 1, 1), name: 'New Year' }] }),
colorScale: { color: 3, steps: 4 },
});
import { plainDate } from '@absoluteui/core';
import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
const host = document.querySelector<HTMLElement>('#tickets');
if (host) {
const chart = CalendarHeatmap.create(host, {
label: 'Support tickets',
from: plainDate(2026, 1, 1),
to: plainDate(2026, 3, 31),
firstDayOfWeek: 7,
data: [{ date: plainDate(2026, 1, 2), value: 12 }],
weekdayLabels: 'all',
});
chart.update({ dataTable: 'visible' });
}
Terminal window
npm install @absoluteui/components @absoluteui/core @absoluteui/theme

Registry setup, the theme stylesheet, and the Content Security Policy are covered in Installation.

import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
import '@absoluteui/components/calendar-heatmap/style.css';
import { plainDate } from '@absoluteui/core';
import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
import '@absoluteui/components/calendar-heatmap/style.css';
const host = document.querySelector<HTMLElement>('#activity');
if (host) {
CalendarHeatmap.create(host, {
label: 'Activity',
year: 2026,
data: [{ date: plainDate(2026, 6, 1), value: 4 }, { date: plainDate(2026, 6, 2), value: 9 }],
});
}
More usage

A year of absences with a business calendar:

import { plainDate } from '@absoluteui/core';
import { createBusinessCalendar } from '@absoluteui/components/business-calendar';
import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
const host = document.createElement('div');
document.body.append(host);
CalendarHeatmap.create(host, {
label: 'Absences in 2026',
year: 2026,
data: [
{ date: plainDate(2026, 1, 5), value: 3 },
{ date: plainDate(2026, 1, 6), value: 5 },
{ date: plainDate(2026, 2, 10), value: 1 },
],
businessCalendar: createBusinessCalendar({ holidays: [{ date: plainDate(2026, 1, 1), name: 'New Year' }] }),
colorScale: { color: 3, steps: 4 },
});

A quarter starting on Sunday:

import { plainDate } from '@absoluteui/core';
import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
const host = document.querySelector<HTMLElement>('#tickets');
if (host) {
const chart = CalendarHeatmap.create(host, {
label: 'Support tickets',
from: plainDate(2026, 1, 1),
to: plainDate(2026, 3, 31),
firstDayOfWeek: 7,
data: [{ date: plainDate(2026, 1, 2), value: 12 }],
weekdayLabels: 'all',
});
chart.update({ dataTable: 'visible' });
}

Using Angular? See Calendar Heatmap for Angular.

CalendarHeatmap.create(host: HTMLElement, options: CalendarHeatmapOptions): CalendarHeatmap

Global configuration key: calendarHeatmap (see Configuration).

Option Type Default Description
label string Chart title: visible text and the accessible name of the plot (aria-labelledby); also the data table caption. Required.
hideLabel boolean false Visually hide the title; it stays the accessible name.
description string Visible description below the title, also referenced by aria-describedby (text only).
summary string Replaces the generated accessible summary (date range, days with values, total, highest and lowest days, non-working days and holidays).
valueFormat Intl.NumberFormatOptions Number format for day values (tooltips, accessible names, legend, table, summary).
formatValue (value: number) => string Custom value text; overrides valueFormat everywhere.
hiddenSeries readonly string[] Shared chart option; a calendar heatmap has no series, so it has no effect.
theme ChartTheme Look and feel: { palette?: string[] (1-8 CSS colors for slots 1-8); fontFamily?; fontSize? (8-32 px); textColor?; gridLines?: boolean; gridColor?; gridDash?; axisColor?; lineWidth?; markerSize?; cornerRadius?; barRadius?; cellRadius?; sliceRadius?; boxRadius?; swatchRadius?; tooltipRadius?; controlRadius?; lineJoin?; areaOpacity?; gradient?; valueLabelColor?; tooltip?: { background?, color?, borderColor? }; legendPosition?: ‘top’ | ‘bottom’ | ‘start’ | ‘end’; animation?: boolean | { duration?: number } }. Applied as –aui-chart-* custom properties and classes on the host through the CSSOM (CSP-safe); colors are validated with CSS.supports(‘color’). Animation is opt-in and never runs with prefers-reduced-motion: reduce or [data-aui-animation=‘none’].
renderTooltip (context: ChartTooltipContext) => Node | null Custom tooltip content as DOM nodes (never HTML strings). context: { title, rows: { label, value, seriesId }[], column, row, source: “pointer” | “focus” | “sync” }. Return null for the default tooltip. The tooltip stays aria-hidden; the focused mark keeps its accessible label.
syncGroup string Synchronized crosshair: charts with the same group show the highlight and tooltip at the same column (week index) when one is hovered or focused.
data readonly CalendarHeatmapDay[] Days: { date: PlainDate; value: number | null } (null, NaN, and infinities are days without value; later duplicates replace earlier ones). At most 20,000 entries. Required.
year number Show this calendar year (ignored when from and to are both set).
from PlainDate First day shown (inclusive). Default: January 1 of year, else the first data date.
to PlainDate Last day shown (inclusive), at most 1,097 days after from. Default: December 31 of year, else the last data date.
firstDayOfWeek number First row: ISO weekday 1 (Monday) to 7 (Sunday). Default: from the locale (getFirstDayOfWeek).
businessCalendar BusinessCalendarEngine | null Business calendar (createBusinessCalendar from @absoluteui/components/business-calendar): non-working days are outlined, holidays get a dot and their name in tooltips, accessible names, and the table.
colorScale ChartColorSteps { color?: 1-8 (default 1), min?, max? (fixed domain; default the nice-rounded data extent), steps?: 3-9 (default 5) }. Values outside a fixed domain use the first or last step.
legend 'auto' | 'show' | 'hide' "auto" Legend of the color steps with their ranges, “No value”, and (with a business calendar) the non-working-day and holiday keys; auto and show both show it, hide removes it. Entries are not buttons. Globally configurable.
dataTable 'toggle' | 'visible' | 'hidden' | 'none' "toggle" Data table fallback (one row per day: date, value, and (with a business calendar) the day type): behind a Show data table button (built on first open), always visible, visually hidden (screen readers only), or none. Globally configurable.
tooltip boolean true Tooltip on pointer hover and keyboard focus. Globally configurable.
patterns boolean false Shared chart option (toggles aui-chart–patterns); day squares are not textured, so it has no visible effect. Globally configurable.
height number 180 Plot height in CSS px (integer 120-2000); the width follows the container. Globally configurable.
monthLabels boolean true Month names above the first week of each month. Globally configurable.
weekdayLabels 'auto' | 'all' | 'none' "auto" Weekday names beside the rows: auto (every other row), all, or none. Globally configurable.
locale string "en-US" Number, date, and message locale. Globally configurable. Inherited from common configuration.
direction 'ltr' | 'rtl' "ltr" rtl puts the first week on the right and swaps ArrowLeft/ArrowRight. Globally configurable. Inherited from common configuration.
Property Type Description
host HTMLElement The host element.
element SVGSVGElement The plot (svg role=“group”), named by the title and described by the summary.
summary string The generated (or custom) accessible summary.
hiddenSeries string[] Shared chart property; always empty.
Method Description
update(options: Partial<CalendarHeatmapOptions>): void Merge, validate, and re-render. Invalid options throw and keep the previous state. Keyboard focus stays on the same mark.
setSeriesVisible(id: string, visible: boolean): void Shared chart method; no effect beyond a re-render.
destroy(): void Remove rendering, host classes, listeners, the resize observer, timers, and the configuration subscription.
Event Detail Bubbles Cancelable Description
aui-point-click CalendarHeatmapPointClickDetail = ChartPointClickDetail: { seriesId: string | null; column: number; row: number; label: string; series: string; value: string; source: 'pointer' | 'keyboard' } Yes No A day was activated: pointer click or tap, or Enter / Space on the focused day. label is the formatted date, column the week, row the weekday row, value the formatted value.

All rules live in the aui.components cascade layer, so application styles override them without specificity battles.

Class Purpose
aui-chart Host (shared chart chrome).
aui-calendar-heatmap Host modifier for this chart type.
aui-chart__header / __title / __title--hidden / __description / __toolbar Title, description, and the toolbar (zoom buttons).
aui-chart__legend / __legend-entry / __legend-item / __legend-label / __swatch Legend and its aria-hidden keys.
aui-chart__body / __svg / __layer Plot container (height from –aui-chart-height), SVG, and drawing layer.
aui-chart__series--c1 ... --c8 Palette slot classes; set –aui-chart-color from –aui-chart-<n>.
aui-chart__mark / __mark--active / __mark--hover Focusable marks and their states.
aui-chart__tooltip / __tooltip--custom / __tooltip-title / __tooltip-row Tooltip (aria-hidden; the focused mark carries the same text).
aui-chart__empty / __summary Empty state text and the hidden summary referenced by aria-describedby.
aui-chart__data / __data--hidden / __table-toggle / __table-scroll / __table Data table fallback.
aui-chart--legend-bottom / --legend-start / --legend-end / --animate / --entering theme.legendPosition and theme.animation.
aui-calendar-heatmap__cells / __cell / __cell--empty Day squares (focusable marks) and days without value.
aui-calendar-heatmap__cell--off / __cell--holiday Non-working days (dashed outline) and holidays (business calendar).
aui-calendar-heatmap__holidays / __dot aria-hidden holiday dots.
aui-calendar-heatmap__level--15 ... --100 Fill strength in steps of 5 (sets –aui-calendar-heatmap-fill).
aui-calendar-heatmap__swatch-empty / __swatch-off / __swatch-holiday Legend keys for days without value, non-working days, and holidays.
aui-chart__axis / __tick-label aria-hidden month and weekday labels.

Tokens this stylesheet reads (verified in CI). Override them in a theme or with the Theme Designer.

--aui-border-width | --aui-color-border | --aui-color-border-strong | --aui-color-chart-1 | --aui-color-chart-2 | --aui-color-chart-3 | --aui-color-chart-4 | --aui-color-chart-5 | --aui-color-chart-6 | --aui-color-chart-7 | --aui-color-chart-8 | --aui-color-chart-axis | --aui-color-chart-grid | --aui-color-error-fg | --aui-color-focus-ring | --aui-color-hover | --aui-color-info-fg | --aui-color-link | --aui-color-success-fg | --aui-color-surface | --aui-color-surface-sunken | --aui-color-text | --aui-color-text-muted | --aui-color-warning-fg | --aui-duration-fast | --aui-easing-standard | --aui-focus-ring-offset | --aui-focus-ring-width | --aui-font-family-sans | --aui-font-size-md | --aui-font-size-sm | --aui-font-size-xs | --aui-font-weight-medium | --aui-font-weight-regular | --aui-font-weight-semibold | --aui-line-height-normal | --aui-line-height-tight | --aui-radius-md | --aui-radius-sm | --aui-shadow-md | --aui-space-1 | --aui-space-2 | --aui-space-3 | --aui-tooltip-max-width | --aui-touch-target-min

TypeScript definitions
type CalendarHeatmapWeekdayLabels = 'auto' | 'all' | 'none';
interface CalendarHeatmapConfig extends ChartBaseConfig { monthLabels: boolean; weekdayLabels: CalendarHeatmapWeekdayLabels }
interface CalendarHeatmapDay { date: PlainDate; value: number | null }
interface ChartColorSteps { color?: ChartColor; min?: number; max?: number; steps?: number }
interface CalendarHeatmapOptions extends ChartCommonOptions, Partial<CalendarHeatmapConfig> {
data: readonly CalendarHeatmapDay[];
year?: number;
from?: PlainDate;
to?: PlainDate;
firstDayOfWeek?: number;
businessCalendar?: BusinessCalendarEngine | null;
colorScale?: ChartColorSteps;
}

Pattern: SVG calendar grid as a named, described group (role=“group” with aria-roledescription “calendar heatmap”) of role=“img” days with roving focus following the APG date grid keys (day and week); a legend of steps and day types; data table fallback.

Checked on every docs build: the showcase passes axe (WCAG 2.2 A and AA rules) in the default, dark, and high-contrast themes and right to left; the playground loads without errors and passes axe before and after every on/off option is switched, with no Content Security Policy violations.

Key Context Action
ArrowUp / ArrowDown Day focused Previous / next day (crossing weeks).
ArrowLeft / ArrowRight Day focused Same weekday of the previous / next week (swapped in RTL).
Home / End Day focused First / last day of the week.
PageUp / PageDown Day focused Same day of the previous / next month (Shift: year), clamped to the range.
Enter / Space Mark focused Fires aui-point-click with source “keyboard”.
Escape Tooltip visible Hides the tooltip without moving focus (WCAG 1.4.13); it returns on the next move.
Tab / Shift+Tab Any One tab stop for the plot (the active mark), then the Show data table button and the table region.
Element Role
svg.aui-chart__svg group with aria-roledescription “calendar heatmap” (localized), named by the title
days (rect.aui-calendar-heatmap__cell) img with an aria-label: date, value (or “No value”), and holiday name or “Non-working day”
legend list (ul) named “Legend”; static entries
data table table (native): date, value, day type
month and weekday labels, holiday dots, tooltip aria-hidden (decorative duplicates of the accessible data)
Attribute Element Value
aria-labelledby svg id of the visible (or visually hidden) title
aria-describedby svg description id (when provided) and the generated summary id
aria-roledescription svg Localized “calendar heatmap”
tabindex active mark 0 on exactly one mark (roving); other marks have none
aria-expanded / aria-controls Show data table button Table open state and the table region id
aria-label each mark Localized: date, value (or “No value”), and holiday name or “Non-working day”

Roving focus: one day is in the tab sequence and keeps the last visited day across re-renders. Moves stop at the first and last day of the range.

Criterion Level Note
1.1.1 Non-text Content A
1.3.1 Info and Relationships A
1.4.1 Use of Color A
1.4.3 Contrast (Minimum) AA
1.4.10 Reflow AA
1.4.11 Non-text Contrast AA
1.4.13 Content on Hover or Focus AA
2.1.1 Keyboard A
2.4.3 Focus Order A
2.4.7 Focus Visible AA
4.1.2 Name, Role, Value A

Automated test results: Accessibility and compliance.

  • Lightness is never the only cue: every day’s accessible name and tooltip carry its exact value, the legend lists every step’s range, and the data table lists every day.
  • Non-working days and holidays are marked by an outline style and a dot, and named in text, not by color.
  • The week starts on the locale’s first day (getFirstDayOfWeek) unless firstDayOfWeek is set.
  • Manual screen-reader verification (NVDA, JAWS, VoiceOver, TalkBack) is pending.
  • A year is many key presses; browse-mode users can read the data table instead.
Import cost Minified gzip brotli CSS brotli
@absoluteui/components/calendar-heatmap 53.9 kB 19.2 kB 17.2 kB 2.4 kB

Measured at build time, including every AbsoluteUI module the component pulls in. No third-party runtime dependencies.

Budget (enforced in CI) Limit
CalendarHeatmap.create for one year (365 days) with a business calendar, including the first render < 60 ms in headless Chromium

Tested scale: One to three years (up to 1,098 days); every day is a focusable SVG rect.

Budget: CalendarHeatmap.create for one year (365 days) with a business calendar, including the first render < 60 ms in headless Chromium. One number formatter per render; the data table is built lazily.

Measured run times: Performance.

States

default; with business calendar (non-working days and holidays marked); day without value; empty (no data: No data); day focused (tooltip); day hovered; table open.

State transitions
From Trigger To
plot not focused Tab active day focused, tooltip shown
day focused arrow keys, Home, End, PageUp, PageDown another day focused
tooltip visible Escape tooltip hidden
any update() / configuration change re-rendered; focus kept on the same day
Accessibility notes
  • Lightness is never the only cue: every day’s accessible name and tooltip carry its exact value, the legend lists every step’s range, and the data table lists every day.
  • Non-working days and holidays are marked by an outline style and a dot, and named in text, not by color.
  • The week starts on the locale’s first day (getFirstDayOfWeek) unless firstDayOfWeek is set.
  • Manual screen-reader verification (NVDA, JAWS, VoiceOver, TalkBack) is pending.
  • A year is many key presses; browse-mode users can read the data table instead.
Responsive behavior

The width follows the container (ResizeObserver); day squares are sized to fit all weeks in the width (and seven rows in the height). Month labels are thinned when crowded; weekday labels show every other row (auto). Wide data tables scroll in a focusable region.

Right-to-left

direction rtl puts the first week on the right and the weekday labels on the right, and swaps ArrowLeft/ArrowRight (previous / next week).

Theming

Steps mix color-chart-<slot> into color-surface at 15-100%; days without value use color-surface-sunken; non-working days get a dashed color-border-strong outline; holiday dots use color-text; hover and focus outline color-text. Forced colors: outlined squares (Canvas / CanvasText), Highlight on focus.

Global configuration
configureAbsoluteUI({ components: { calendarHeatmap: { monthLabels: true, weekdayLabels: 'auto', dataTable: 'visible' } } });

Changes apply to existing instances immediately.

Component configuration

Instance options override global and theme defaults. All options are dynamic.

Timezones

Dates are PlainDate values (calendar days without a time zone); nothing is converted. Business-calendar awareness comes from businessCalendar.

Security

All text uses textContent; SVG uses createElementNS; colors are classes or CSSOM custom properties. No innerHTML or style attributes.

Data handling

No persistence, network access, or telemetry.

Supported data scale

One to three years (up to 1,098 days); every day is a focusable SVG rect.

Edge cases
  • Days outside the range are not drawn; the first and last weeks may be partial.
  • Data outside the range is ignored.
  • A holiday that is also in the data shows both its value and its name.
  • With no values at all but a range, the grid shows every day as “No value”.
Errors

Invalid options throw a configuration error (code CALENDAR_HEATMAP_OPTIONS) naming the option and the expected value, before anything renders; update() with invalid options throws and keeps the previous state. Errors never include option values.

Known limitations
  • Daily values only (PlainDate); no hourly breakdown.
  • Discrete sequential steps (3-9) of one palette slot.
  • Manual screen-reader verification is pending.
Unsupported scenarios
  • More than 1,098 days.
  • Diverging scales.
  • Vertical (weeks as rows) layout.