Heatmap
Where activity clusters
Each row is a period. The same controls update the line chart and heatmap.
FastPlotJs
Line up hours, weekdays, or dates across periods to see where patterns repeat and where they change.
Sample data / Reservations
Hover over the chart to compare values.
Heatmap
Each row is a period. The same controls update the line chart and heatmap.
Donut charts
One donut per year, with matching colors for the same month.
Annual totals · hover a segment for its month and value
Implementation
Call calendarCharts() to turn timestamped values into chart options. Pass each returned panel to createChart().
The live charts use a preview build from source. Use a build that exports calendarCharts to run these snippets.
import { calendarCharts, createChart } from "fastplotjs";
const samples = [
{ timestamp: "2026-05-15T08:00:00Z", value: 18 },
{ timestamp: "2026-05-15T12:00:00Z", value: 27 },
{ timestamp: "2026-06-15T08:00:00Z", value: 31 },
];
const [panel] = calendarCharts(
{ type: "line", legend: true },
samples,
"month",
"sum",
);
if (panel) createChart(document.querySelector("#chart"), panel);
from fastplotpy import calendarCharts, createChart
samples = [
{"timestamp": "2026-05-15T08:00:00Z", "value": 18},
{"timestamp": "2026-05-15T12:00:00Z", "value": 27},
{"timestamp": "2026-06-15T08:00:00Z", "value": 31},
]
panel, = calendarCharts(
{"type": "line", "legend": True},
samples,
"month",
"sum",
)
chart = createChart(panel)
print(chart.serve())
For JavaScript, add <canvas id="chart" width="800" height="400"></canvas> to the page. To switch periods, call calendarCharts again with the original samples.
API reference
Calendar boundaries use UTC. Send an ISO date, an ISO timestamp with an explicit offset, or epoch milliseconds.
| Period | Shared slots |
|---|---|
day | 00:00–23:00 UTC |
week | Monday–Sunday |
month | Day 1–31 |
year | January–December |
Empty slots stay missing. Line, bar, wonderplot, and polar use one trace per period. Heatmap uses one row per period. Pie and donut each use a separate panel per period. Map uses one panel per populated slot in each period and aggregates separately by coordinate or region ID. The mode supports 2D chart families.