import { MainAxis, Observation } from '@graphysdk/react'; /** A box placed by its share of the band on the main axis and its summary on the other, each a `[0, 1]` fraction. */ export interface Box { observation: Observation; /** The box's two edges on the main axis: its group's share of the band once dodged. */ start: number; end: number; lowerWhisker: number; q1: number; median: number; q3: number; upperWhisker: number; /** Where the mean marker sits; `null` unless the layer shows it. */ mean: number | null; /** The notch's two ends around the median; `null` unless the layer notches its boxes. */ notch: { lower: number; upper: number; } | null; } /** A value past its box's whiskers, standing on the box's center line. */ export interface Outlier { observation: Observation; /** The centre of its box's share of the band. */ band: number; value: number; } export interface Boxplot { boxes: Box[]; outliers: Outlier[]; } /** The center line a box's whiskers and outliers stand on. */ export declare const readBoxCentre: (box: Pick) => number; /** * Reads where a box sits. The flip is already baked into the position columns, so under `coord.flip()` the * box's edges are `yMin`/`yMax` and its whiskers run `xMin` to `xMax`; the median and quartiles are scaled on the value * axis whatever the flip. `null` for an outlier's observation or a box missing a position. */ export declare const readBox: (observation: Observation, mainAxis: MainAxis) => Box | null; /** Reads where an outlier sits; `null` for a box's observation. */ export declare const readOutlier: (observation: Observation, mainAxis: MainAxis) => Outlier | null; /** Reads every box and outlier of a layer, skipping an observation missing a position. */ export declare const readBoxplot: (observations: Iterable, mainAxis: MainAxis) => Boxplot;