Area Chart

Totals over time and what makes them up, stacked or as shares of 100%.

Monthly recurring revenue by source.
MonthExistingExpansionNew
December 2025$185,797$22,206$14,532
January 2026$191,209$22,905$15,650
February 2026$195,479$23,628$14,883
March 2026$201,305$25,027$15,255
April 2026$206,020$26,189$15,817
May 2026$211,651$27,587$15,926
June 2026$216,665$29,120$15,894
July 2026$221,816$30,074$16,845
August 2026$228,030$31,299$16,316
September 2026$234,821$32,353$16,525
October 2026$240,333$33,428$15,835
November 2026$246,452$35,206$15,099

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/area-chart

Usage

import { Chart } from "./ui/uicontext/components/charts/Chart.ts"import type { ChartSeries } from "./ui/uicontext/components/charts/Data.ts"
export const RevenueArea = <M>(h: Html.H<M>, series: ReadonlyArray<ChartSeries>) =>	Chart(h, {		props: {			type: "area",			stacked: "stacked",			label: "Monthly recurring revenue by source",			series,			x: { kind: "time", unit: "month" },			format: { style: "currency", currency: "USD", digits: 0 },		},		onEmit: { Highlighted: () => undefined, Selected: () => undefined, Toggled: () => undefined, RequestedRetry: () => undefined },	})

Examples

Controlled

The page owns the hidden series and hears hover and clicks.

Recurring revenue by source.
DateExpansionNew
December 2025$22,206$14,532
January 2026$22,905$15,650
February 2026$23,628$14,883
March 2026$25,027$15,255
April 2026$26,189$15,817
May 2026$27,587$15,926
June 2026$29,120$15,894
July 2026$30,074$16,845
August 2026$31,299$16,316
September 2026$32,353$16,525
October 2026$33,428$15,835
November 2026$35,206$15,099

Hidden: Existing.

Share of 100%

Stacked as percentages, smoothed. Hide a plan and the rest fill the whole again.

Signups by plan, share of each week.
Week ofFreeProTeamEnterprise
Sep 7, 2026409154709
Sep 14, 2026407167729
Sep 21, 2026420165799
Sep 28, 20264301638010
Oct 5, 20264551617810
Oct 12, 20264911717910
Oct 19, 20264791698811
Oct 26, 20265071619412
Nov 2, 20264901659913
Nov 9, 202653617010113
Nov 16, 202652118610013
Nov 23, 202653020511113

API reference

Props

Chart props
NameTypeDefaultDescription
typerequiredChartType——
labelrequiredstring—What the chart shows, for screen readers and the table's caption: "Monthly recurring revenue"
seriesrequiredChartSeries[]——
xChartXAxis—The x axis: categories in the order given (the default), or time
formatChartFormat—How values read; a series' own format wins for it
endFormatChartFormat—A combo chart's end axis format
stacked"none" | "stacked" | "percent"—Stack areas or bars; percent shows each x as shares of 100%
horizontalboolean—Bars run sideways, categories down the side: for long names or ranked lists
curve"linear" | "smooth" | "step"——
markersboolean—A dot on every point, when there's room for them
zerobooleanTrueStart the value axis at zero; bars and areas always do. True by default
heightnumber240The plot's height in pixels, axes included; 240 by default
hiddenstring[]—Series ids to hide. Leave it out and the chart keeps track itself; pass it to own it
legendboolean—False hides the legend; it shows by default for two or more series
tableToggleboolean—False drops the View as table button; the hidden table for screen readers stays
statusChartStatus——
errorstring—What went wrong, said plainly, under "Couldn't load this chart."
emptystring—What an empty chart says: "No deploys in this period."
localestring——

Events

Chart events
EventPayloadDescription
Highlighted{ x: ChartX | null }The x being read changed, by pointer or keyboard; null when reading stops
Selected{ x: ChartX }A click, a tap or Enter on a point
Toggled{ id: string; hidden: boolean }The legend asked to hide or show a series
RequestedRetry{}—

Accessibility

  • The arrow keys step through each x and announce every series and the total; percent stacks read each share with its count.
  • The hidden table lists every value, and View as table shows it.

Source