Skip to content

Heatmap

Overview

Loading state

Loading placeholder

API Reference

Types come from the public API. A dash indicates no default is documented here.

HeatmapChart props

Public source
PropTypeDefaultDescription
keyKeepAliveKey<K, Ends> | undefined''The child's identity among its parent's children of one component, or a kept child's among its author's. The empty string by default.
onEmit
Show type
((events: { readonly _tag: "HoverChanged"; readonly index: number | null; }) => NoInfer<Msg> | undefined) | { readonly HoverChanged: (event: { readonly _tag: "HoverChanged"; readonly index: number | null; }) => NoInfer<Msg> | undefined; } | undefined
—Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event.
props.data
Show type
readonly { readonly bin: number; readonly bins: readonly { readonly date: number; readonly count: number; readonly bin: number; readonly observed?: boolean; readonly tooltipLabel?: string; }[]; }[]
Required
props.idstringRequired
props.currentDatenumberRequiredExplicit clock makes SSR deterministic; supply the same epoch on server/client.
props.animateboolean—
props.gapnumber2
props.animationDurationnumber—
props.aspectRatiostring—
props.margin
Show type
{ readonly bottom?: number; readonly left?: number; readonly right?: number; readonly top?: number; }
—
props.widthnumber720
props.layout"fill" | "fluid"—
props.classNamestring—
props.ariaLabelstring'Heatmap chart'
props.status"loading" | "ready"—
props.tooltip
Show type
{ readonly backgroundColor?: string; readonly className?: string; readonly instant?: boolean; readonly showDelay?: number; readonly hideDelay?: number; }
—
props.separator
Show type
{ readonly every?: number; readonly stroke?: string; readonly spacing?: number; readonly strokeDasharray?: string; readonly strokeOpacity?: number; readonly strokeWidth?: number; readonly startOffset?: number; readonly gradient?: { readonly from: string; readonly to: string; readonly via?: string; readonly fromOpacity?: number; readonly viaOpacity?: number; readonly toOpacity?: number; }; readonly strokeStyle?: "solid" | "dashed"; readonly showLabels?: boolean; readonly groupBy?: "every" | "quarter"; readonly paddingY?: number; readonly labelOffset?: number; }
—
props.xAxisboolean—
props.ariaDescriptionstring—
props.xDomainreadonly [number, number]—
props.loadingLabelstring—
props.revealSignaturestring—
props.yAxis
Show type
{ readonly rowOpacity?: number | readonly number[]; readonly tickFilter?: "all" | "odd" | "even"; readonly labelFormat?: "initial" | "full"; }
—
props.enterTransition
Show type
{ readonly delay?: number; readonly duration?: number; readonly ease?: string | readonly number[] | readonly (string | readonly number[])[]; readonly type?: unknown; readonly stiffness?: number; readonly damping?: number; readonly mass?: number; readonly bounce?: number; }
—
props.enterStaggerScalenumber—
props.highlightedLevel0 | 1 | 2 | 3 | 4 | nullnull
props.weekStartDay0 | 1 | 2 | 3 | 4 | 5 | 6—
props.cells
Show type
{ readonly ariaLabel?: string; readonly ariaDescription?: string; readonly inactiveOpacity?: number; readonly rowOpacity?: number | readonly number[]; readonly cornerRadius?: number; readonly inactiveScale?: number; readonly activeScale?: number; readonly interactive?: boolean; readonly hideGhostCells?: boolean; }
{}
props.levelColorsreadonly [string, string, string, string, string]—
props.binSizenumber—
props.loadingOpacitynumber—
props.showLoadingCellsboolean—
props.loadingCellMaxOpacitynumber—
props.loadingCellRandomnessnumber—