Histogram
How a set of raw numbers is spread out.
Click a mark to pin its value
View data
| Label | Value |
|---|---|
| 9–16.17 | 5 |
| 16.17–23.33 | 7 |
| 23.33–30.5 | 8 |
| 30.5–37.67 | 5 |
| 37.67–44.83 | 3 |
| 44.83–52 | 3 |
<Histogram title="Session duration (minutes)" data={data} bins={6} />Usage
Data
data takes number[]. Input arrays are never mutated and order is preserved.
binsis an integer from 1 to 100 and defaults to 8.- The largest sample lands in the final bin. Identical samples use a padded domain.
- The
histogramhelper returns the bins (lower,upper,label,value) if you want to draw your own.
Every chart also accepts the common props: description, height, color, variant, animate, formatValue and className.