Skip to content
caliper ui pro docs

Histogram

The shape of a distribution. Choosing coarser or finer bins retargets the same bars, and the median and p95 markers slide to their values.

Pro
Latency, last hour

Median 188 ms · p95 442 ms · 600 values

Latency, last hour
RangeCount
40–73 ms2
73–105 ms6
105–138 ms49
138–170 ms143
170–203 ms176
203–235 ms102
235–268 ms34
268–301 ms3
301–333 ms4
333–366 ms11
366–398 ms20
398–431 ms16
431–463 ms15
463–496 ms10
496–528 ms8
528–561 ms1

When to use

  • Response times, order values, session lengths.
  • Checking whether a mean hides two groups.

When not to use

  • A few categories; use the bar chart.
  • Comparing several distributions; use the box plot.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/histogram

Adds its 8 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.

API reference

binValues

0 props

No props of its own; it accepts the native props of its root element.

Histogram

13 props
PropTypeDefaultDescription
label *string—
values *readonly number[]—
binsreadonly number[][8, 16, 32]Bin counts people can choose between.
defaultBinsnumber—
minnumber—
maxnumber—
unitstring""
formatValue((value: number) => string)numberText
markersbooleantrueShow median and p95 markers.
heightnumber240
loadingboolean—
errorstring—
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes group and status semantics, with aria-label, aria-busy and aria-hidden kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/histogram.md

The index of every part is at /llms.txt.

More in Distribution charts