Skip to content

grafit-charts


Interface: BinningOptions ​

Extended by ​

Properties ​

binCount? ​

optional binCount?: number | BinRule

Number of bins, or the rule that picks it. Default 'auto'.


binInclusive? ​

optional binInclusive?: BinInclusive

'left' — [x0, x1), the last bin closed; 'right' — (x0, x1], the first one closed.


binOrigin? ​

optional binOrigin?: number

Value the grid is aligned to (default 0): edges fall on binOrigin + k·width.


bins? ​

optional bins?: [number, number][]

Explicit edges: [[min,max], ...]. Wins over every other option here.


binWidth? ​

optional binWidth?: number | TimeBinUnit

Bin width. Wins over binCount: the step is the intent, the count follows. A calendar unit ('month', 'week', …) bins dates instead of numbers — the values are read as dates and the grid is aligned in UTC, where the ticks of the time axis are.


domain? ​

optional domain?: [number, number]

Range to bin; values outside it are ruled by outliers. Default — the data extent.


nice? ​

optional nice?: boolean

Round the computed step to 1/2/5×10ⁿ (default true; ignored with binWidth).


outliers? ​

optional outliers?: BinOutliers

Values outside domain: dropped (default) or piled into the edge bins.