Skip to content

Components · Display

AvailabilityHeatmap

Density visualization of entity availability across a date range. One row per entity, one cell per time slice. Color encodes utilization.

Key points

  • Multi-entity rows, time-slice cells. Color encodes booking density or capacity utilization
  • Granularity is hour, half-day, day, or week — pick to match the question
  • Click handlers receive the cell’s entity and time so you can drill into details

Import

import { AvailabilityHeatmap } from '@flexischeduler/scheduling-components';

Basic usage

<AvailabilityHeatmap
  entityIds={['ent_staff_a', 'ent_staff_b', 'ent_staff_c']}
  startDate={new Date('2026-05-01')}
  endDate={new Date('2026-05-31')}
  granularity="hour"
  onCellClick={(cell) => console.log(cell.entityId, cell.timestamp)}
/>

Reference

Props

Name

Type

Description

entityIds

required

string[]

Entities to render rows for. Order is preserved.

startDate

required

Date

Start of the time range

endDate

required

Date

End of the time range (inclusive)

granularity
"hour" | "half-day" | "day" | "week"

default: "day"

Time-slice granularity for cells

colorScale
"density" | "capacity"

default: "density"

density colors by booking count; capacity colors by utilization-vs-cap ratio

legend
boolean

default: false

Show a color-scale legend

Events

Event

Payload

Fires when

onCellClick(cell: { entityId, timestamp, value }) => void

User clicked a heatmap cell

onRowClick(entityId: string) => void

User clicked an entity label on the y-axis

Team view

For dispatcher-style team views, render the whole team at hourly granularity for a week:

<AvailabilityHeatmap
  entityIds={teamMemberIds}
  startDate={weekStart}
  endDate={weekEnd}
  granularity="hour"
  colorScale="capacity"
  legend
/>

Density vs. capacity

Use density when entities have no intrinsic capacity (most staff scheduling). Use capacity when you have explicit capacity values per pattern (rooms with seating, vehicles with passenger limits) — it surfaces “75% full” rather than “3 bookings.”