Skip to content
Browse docs and components

Histogram Chart

histogram-chart

How a set of measurements is distributed, on TanStack Charts. Bins are computed with round edges, the tooltip names each range and its count, and dashed markers put a median or p95 right on the shape.

Responsive

Install

$npxshadcnadd@forme/histogram-chart

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

HistogramChart

How a set of measurements is distributed: where most of them fall, how long the tail is, whether there are two humps instead of one.

PropTypeDefaultDescription
values*readonly number[]—The observations: response times, order values, session lengths.
label*string—Accessible name. Say what was measured and how many times.
binsnumber12Roughly how many bars. The width is rounded to a readable step, so this is a target.
markersreadonly HistogramMarker[][]Dashed reference lines: a median, a p95, a budget.
formatValue(value: number) => stringplain
unitstring"count"The name of what is counted, for the tooltip.
heightnumber260
classNamestring—