Preview Updated 2026-05-10

CalendarHeatmap

52-week × 7-day grid heatmap colored by intensity — handy for activity or commit statistics.

Basic usage

data is [{ date: 'YYYY-MM-DD', value: number }]. thresholds defaults to [1, 3, 6, 10], producing 5 color tiers (including 0).

5月6月7月8月9月10月11月12月1月2月3月4月5月
<CfCalendarHeatmap :data="data" />
<CfCalendarHeatmap data={data} />

API

PropTypeDefaultDescription
dataHeatmapDay[]List of date + value pairs; missing dates count as 0
startDatestring | Datetoday - 1 yearRange start
endDatestring | DatetodayRange end
thresholdsnumber[][1, 3, 6, 10]Ascending intensity thresholds; tier count = length + 1

HeatmapDay

FieldTypeDescription
datestringYYYY-MM-DD date
valuenumberValue for that day

反馈与讨论

CalendarHeatmap · Discussion

0
0 / 600
一键发送
正在加载评论...