Are you an AI agent?

HistogramSeries

Try the live demo
import { HistogramSeries } from '@wick-charts/react';
 
<HistogramSeries data={data} />

Renders the distribution of samples as contiguous bars on a numeric X axis — set axis={{ x: { type: 'numeric' } }}. data takes raw samples (number[]), which the series bins, or bins counted already ({ x0, x1, count }[]); several of them, or { label, color?, data } layers, overlay on one shared set of bins with a legend. binWidth fixes the width, bins sets a target count; by default Sturges’ rule picks the count and the width rounds to 1, 2 or 5 × 10ⁿ, so the X ticks sit on bin edges. normalize shows 'count', 'percent' or 'density'. quantiles draws dashed p50 / p95 lines per layer. <Tooltip> names the bin range and lists the count and share of each layer. New samples re-bin, and each bar eases to its new height.

Props

dataHistogramData

Series data — raw samples (number[]), binned by the series, or bins counted already ({ x0, x1, count }[]). Several distributions overlay on the same bins: pass an array of them, or { label, color?, data } layers to name and color them for the legend and tooltip. Needs axis={{ x: { type: 'numeric' } }}.

options?Partial<HistogramSeriesOptions>

Binning, normalize, quantile lines, gap, opacity and animation timings.

id?string

Stable series ID — same value across remounts.

visible?default trueboolean

Show/hide the series without unmounting it. Default true. Live.

scale?default the default scalestring

Named Y scale from the container's scales. Default: the default scale. Live.