Documentation / @ripl/charts / bin
Function: bin()
bin(
values,options?):Bin[]
Defined in: charts/src/core/statistics.ts:108
Bins numeric values into a histogram. Without explicit thresholds, a "nice" uniform bin width is derived from the target bin count (Sturges' rule by default). Values outside the domain are dropped.
Parameters
| Parameter | Type |
|---|---|
values | number[] |
options? | BinOptions |
Returns
Bin[]