Skip to content

BinTransform

BinTransform = object

Defined in: spec/transform.ts:25

Binning is declared, never pre-applied.

A frame that already carries buckets cannot be re-fitted: an eighty-column terminal, a 1200 px canvas and an eight-cell sparkline each want a different bucket count. Carrying the raw values plus this intent lets each renderer choose.

optional as?: readonly [string, string]

Defined in: spec/transform.ts:35

Names for the two bound fields the transform produces.


field: string

Defined in: spec/transform.ts:27


kind: "bin"

Defined in: spec/transform.ts:26


optional maxBins?: number

Defined in: spec/transform.ts:29

Upper bound on bucket count. The renderer picks a nice width under it.


optional rule?: "sturges" | "scott" | "freedman-diaconis"

Defined in: spec/transform.ts:33

Bucket-width rule when neither is given. Default "freedman-diaconis".


optional step?: number

Defined in: spec/transform.ts:31

Exact bucket width, overriding maxBins.