Skip to content
caliper ui docs

Pro

Brush chart

A chart you zoom by dragging a brush, with event annotations.

Pro
pnpm dlx shadcn@latest add @caliper/brush-chart

Billing history

Halden workspace · January to April 2026, thousands USD

Daily revenue
Daily revenue
PointActualEvent
Jan 31, 2026110.3286058026949
Feb 1, 2026111.41137421215416
Feb 2, 2026112.69336486745937
Feb 3, 2026114.15567739543687
Feb 4, 2026115.77441406604554
Feb 5, 2026117.52134208299938
Feb 6, 2026119.36467601440859
Feb 7, 2026121.26995867951817
Feb 8, 2026123.20101607905738
Feb 9, 2026125.12095990470253
Feb 10, 2026126.99320984456976
Feb 11, 2026128.78250735303743
Feb 12, 2026130.45589278975032
Feb 13, 2026131.98361884782787
Feb 14, 2026133.33997495695044
Feb 15, 2026134.50399981419793v2 launch
Feb 16, 2026135.460062295891
Feb 17, 2026136.19829465131374
Feb 18, 2026136.71486597298707
Feb 19, 2026137.012088364664
Feb 20, 2026137.09835286475754
Feb 21, 2026136.98789690098792
Feb 22, 2026136.70040972090447
Feb 23, 2026136.26048673319784
Feb 24, 2026135.69694788193405
Feb 25, 2026135.04203894397213
Feb 26, 2026134.330537884438
Feb 27, 2026133.59879103630553
Feb 28, 2026132.8837058149575
Mar 1, 2026132.2217278831683
Mar 2, 2026131.64783111288503
Mar 3, 2026131.19454833553738
Mar 4, 2026130.8910697422142
Mar 5, 2026130.76243392022664
Mar 6, 2026130.82883394529514
Mar 7, 2026131.10505776000102
Mar 8, 2026131.60007834759438
Mar 9, 2026132.316805058892
Mar 10, 2026133.25200298387614
Mar 11, 2026134.39638260249257
Mar 12, 2026135.73485723010728
Mar 13, 2026137.24696112289723
Mar 14, 2026138.9074166559965
Mar 15, 2026140.68683485588522
Mar 16, 2026142.55252987279067
Mar 17, 2026144.4694248211904
Mar 18, 2026146.40102388437256
Mar 19, 2026148.31042374259815
Mar 20, 2026150.16133629461314
Mar 21, 2026151.91909432928094
Mar 22, 2026153.55161227661645
Mar 23, 2026155.03027541241295
Mar 24, 2026156.33073287345664
Mar 25, 2026157.43357250607207
Mar 26, 2026158.32485884555896
Mar 27, 2026158.99651931720703
Mar 28, 2026159.44656795589282
Mar 29, 2026159.67916044419746
Mar 30, 2026159.70447894374416
Mar 31, 2026159.5384499114866
Apr 1, 2026159.20230272125693

Jan 31, 2026 – Apr 1, 2026

Selected Jan 31, 2026 to Apr 1, 2026.

Installs components/ui/brush-chart.tsxDepends on @radix-ui/react-slot, d3-shape, lucide-reactMotion shared motion tokens

When to use

Use it for

  • Long histories where people need to focus on a range.
  • Marking releases and incidents on a trend.

Skip it when

  • Short series.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/brush-chart

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { BrushChart } from "@/components/ui/brush-chart"

The worked example comes with Pro

The 30-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

BrushChart

component
PropTypeDefault
label *string—
data *readonly BrushPoint[]—
range *[number, number]—
onRangeChange *(range: [number, number]) => void—
minSpannumber7 * 86400000
annotationsreadonly BrushAnnotation[][]
loadingboolean—
errorstring—
classNamestring—

Accessibility

It exposes slider and status semantics, with aria-label, aria-hidden, aria-valuemin, aria-valuemax, aria-valuenow and aria-valuetext kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
EscapeCloses or cancels, then returns focus to where it came from.
←Moves to the previous item or value.
PageDownMoves by a larger step, or to the next page.
→Moves to the next item or value.
PageUpMoves by a larger step, or to the previous page.
HomeJumps to the first item or the minimum.
EndJumps to the last item or the maximum.

Motion

Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.

All Time-series charts examples