Combo Chart

Bars and a line on one time axis, each read against its own scale.

Weekly revenue and paying customers.
Week ofRevenuePaying customers
Sep 21, 2026$40,6173,854
Sep 28, 2026$39,6393,909
Oct 5, 2026$41,0533,950
Oct 12, 2026$40,3913,989
Oct 19, 2026$40,8744,046
Oct 26, 2026$42,8944,080
Nov 2, 2026$43,0554,126
Nov 9, 2026$42,0134,168
Nov 16, 2026$44,0084,206
Nov 23, 2026$43,3884,267

Installation

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

Usage

import { Chart } from "./ui/uicontext/components/charts/Chart.ts"import type { ChartSeries } from "./ui/uicontext/components/charts/Data.ts"
export const RevenueAndCustomers = <M>(h: Html.H<M>, series: ReadonlyArray<ChartSeries>) =>	Chart(h, {		props: {			type: "combo",			label: "Weekly revenue and paying customers",			series,			x: { kind: "time", unit: "week" },			format: { style: "currency", currency: "USD", digits: 0 },			endFormat: { style: "number" },		},		onEmit: { Highlighted: () => undefined, Selected: () => undefined, Toggled: () => undefined, RequestedRetry: () => undefined },	})

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

  • Each axis is titled with the series it measures, and every value is announced in its own format as the arrow keys move.

Source