Heatmap
A grid coloured by value, sequential or diverging, with missing cells hatched.
Retention by cohort with incomplete cohorts left blank and a size-weighted average.
<CohortHeatmap />Cohort heatmap is a Pro chart.
Installation is part of Pro
The full source is included in the Pro download. Get Pro to install it with the CLI and use it in unlimited projects.
Unlock with Pronpx chartslibraryui add cohort-heatmap --from ./chartslibraryui-proUsage examples are part of Pro
Every example on this page comes with its code in the Pro download. The props and data shape below are public.
Unlock with ProAn array of cohorts: { cohort, size, values[] } where values are fractions of the starting cohort.
[{ cohort: "Jan 26", size: 340, values: [1, 0.78, 0.72, null] }]Missing values are null. Invalid values make the chart say what’s wrong instead of drawing a misleading picture. How charts handle bad data
Every chart also accepts the shared frame props: title, subtitle, source, height, mode, toolbar. Common API
export interface CohortHeatmapProps extends FrameProps {
data: Cohort[];
/** Default: percent (retention as a fraction of the starting cohort). */
format?: FormatInput;
/** Column label prefix. Default "M" (M0, M1, ...). */
periodPrefix?: string;
sizeLabel?: string;
/** Show a size-weighted average row. Default true. */
average?: boolean;
}A grid coloured by value, sequential or diverging, with missing cells hatched.
Trends over time for one to four series, with gaps for missing data and marked forecasts.