0|

Calendar Chart

Documentation Index

Fetch the complete documentation index at: /llms.txt. Use this file to discover all available pages before exploring further.

Day-level calendar heatmaps for workload, capacity, and activity tracking — powered by Apache ECharts

Workload dashboard

Installation

pnpm dlx shadcn@latest add @beecharts/calendar-chart @beecharts/chart-recipes

Usage

The calendar chart is composable. <BeeCalendarChart> is the container — pass a chartConfig whose keys match your utilization series. Map daily availableHours and assignedHours with prepareCalendarWorkloadCells(), then compose <Calendar /> with the resulting cells. Add <Tooltip /> and <Legend /> when you want the shared BeeCharts chrome.

import {
  BeeCalendarChart,
  Calendar,
  Tooltip,
  Legend,
} from "@/components/beecharts/charts/calendar-chart";
import { prepareCalendarWorkloadCells } from "@/lib/chart-recipes";
const workloadDays = [
  { date: "2025-06-02", availableHours: 8, assignedHours: 6.5 },
  { date: "2025-06-03", availableHours: 8, assignedHours: 9.5 },
  // …
];
 
const { cells, min, max, range } = prepareCalendarWorkloadCells(workloadDays);
 
const chartConfig = {
  utilization: {
    label: "Utilization",
    colors: {
      light: ["#ecfdf5", "#34d399", "#b45309", "#dc2626"],
      dark: ["#064e3b", "#34d399", "#fbbf24", "#f87171"],
    },
  },
} satisfies ChartConfig;
 
<BeeCalendarChart config={chartConfig} className="h-80 w-full">
  <Calendar
    dataKey="utilization"
    data={cells}
    range={range}
    min={min}
    max={max}
  />
  <Legend />
  <Tooltip />
</BeeCalendarChart>

Each cell's value is utilization %assignedHours ÷ availableHours × 100. Values above 100 indicate overbooking. The tooltip shows assigned, available, and utilization for each day.

Calendar vs heatmap for workload

ViewChartBest for
One person, one monthBeeCalendarChartSpot overload days, PTO gaps, sprint rhythm
Team × weekBeeHeatmapChart + prepareTeamWorkloadMatrix()Compare who is over/under capacity across the same days
Team × month (dense)BeeHeatmapChartPortfolio view when calendar tiles are too small

Managers typically monitor assigned hours vs available hours per period. Available comes from contracts, shifts, or PTO-adjusted capacity; assigned comes from project allocations, tickets, or scheduled work. Color encodes the ratio — not raw hours — so part-time and full-time staff are comparable.

Examples

Workload dashboard (wired)

KPI summary, view toggle (team week vs employee month), and employee filter — calendar and heatmap share the same utilization scale and demo data.

Workload dashboard

Employee workload (calendar)

One designer's June 2025 — weekday capacity 8h, weekends off. Green days are under capacity; amber/red days are at or above 100%.

Employee workload

Team workload (heatmap)

Same metric across five team members for one work week. Rows are people; columns are days. Use this when a manager needs to rebalance assignments before the week starts.

Team workload

API Reference

The chart is composed of a root container and declarative parts. Render the root, then compose the slots you need as children.

BeeCalendarChart

The root container. Owns chartConfig, the ECharts canvas, and the part registry that compiles calendar options.

PropTypeDefaultDescription
config*ChartConfig

Configuration for the utilization series. Use a multi-stop colors.light / colors.dark array on the key passed to <Calendar dataKey />.

children*ReactNode

Compose <Calendar /> (required for data), optionally <Tooltip /> and <Legend />.

classNamestring

Size and layout classes on the chart container (for example h-80 w-full).

isLoadingboolean

Shows a calendar-shaped skeleton while data loads.

Calendar

Registers day cells and calendar layout with the ECharts compiler. Renders no DOM of its own.

PropTypeDefaultDescription
dataKey*string

Key into chartConfig for the visual map gradient and tooltip labels.

data*CalendarCell[]

Cells from prepareCalendarWorkloadCells() — each { date, value, assignedHours, availableHours }.

rangestring | [string, string]

Month ("2025-06") or date span for the calendar. Inferred from cell dates when omitted.

minnumber

Visual map minimum. Defaults to the smallest cell value.

maxnumber

Visual map maximum. Defaults to the largest cell value (at least 100 for utilization).

cellSizenumber | [number | string, number]

Calendar cell dimensions. Default ["auto", 18].

orienthorizontal|vertical

"vertical" (default for month ranges) — classic grid with weekdays across the top and weeks as rows. "horizontal" — GitHub-style strips; auto-selected for full-year range values like "2025".

Tooltip

Enables the shared BeeCharts HTML tooltip layer. Built-in formatter shows date, assigned hours, available hours, and utilization %.

Legend

Hides the built-in ECharts legend and reserves space for the shared BeeCharts legend chrome when composed.