Calendar Heatmap for Angular
Introduction
Section titled “Introduction”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.
Behavior, design tokens, and limitations are described on the Calendar Heatmap page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import { plainDate } from '@absoluteui/core';import { AuiCalendarHeatmap } from '@absoluteui/angular/calendar-heatmap';import type { CalendarHeatmapDay } from '@absoluteui/components/calendar-heatmap';
@Component({ selector: 'app-absences', imports: [AuiCalendarHeatmap], template: `<aui-calendar-heatmap label="Absences" [year]="2026" [data]="data"></aui-calendar-heatmap>`,})export class AbsencesComponent { readonly data: CalendarHeatmapDay[] = [{ date: plainDate(2026, 1, 5), value: 3 }];}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiCalendarHeatmap } from '@absoluteui/angular/calendar-heatmap';Defaults for every instance: provideAbsoluteUIConfig({ components: { calendarHeatmap: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-calendar-heatmap>
Section titled “<aui-calendar-heatmap>”Class AuiCalendarHeatmap; template reference #ref="auiCalendarHeatmap".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
label |
string |
Required. Chart title: visible text and the accessible name of the plot (aria-labelledby); also the data table caption. | |
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 |
NumberFormatOptions |
Number format for day values (tooltips, accessible names, legend, table, summary). | |
formatValue |
(value: number) => string |
Custom value text; overrides valueFormat everywhere. | |
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 |
ChartTooltipRenderer |
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[] |
Required. Days: { date: PlainDate; value: number | null } (null, NaN, and infinities are days without value; later duplicates replace earlier ones). At most 20,000 entries. | |
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 |
ChartLegendMode |
'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. |
dataTable |
ChartTableMode |
'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. |
tooltip |
boolean |
true |
Tooltip on pointer hover and keyboard focus. |
patterns |
boolean |
false |
Shared chart option (toggles aui-chart–patterns); day squares are not textured, so it has no visible effect. |
height |
number |
'180' |
Plot height in CSS px (integer 120-2000); the width follows the container. |
monthLabels |
boolean |
true |
Month names above the first week of each month. |
weekdayLabels |
CalendarHeatmapWeekdayLabels |
'auto' |
Weekday names beside the rows: auto (every other row), all, or none. |
locale |
string |
'en-US' |
Number, date, and message locale. |
direction |
Direction |
'ltr' |
rtl puts the first week on the right and swaps ArrowLeft/ArrowRight. |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(hiddenSeries)] |
readonly string[] |
(hiddenSeriesChange) |
Shared chart option; a calendar heatmap has no series, so it has no effect. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(pointClicked) |
ChartPointClickDetail |
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. Re-emits aui-point-click. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
setSeriesVisible(id: string, visible: boolean): void |
Shared chart method; no effect beyond a re-render. |
Accessibility and performance
Section titled “Accessibility and performance”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.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Calendar Heatmap: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.