import { CartesianSeries, RectItemStyle, RectItemStylerParams, SeriesBaseOptions } from '../base'; import { CartesianRenderContext, SeriesModule, SeriesPick, TooltipContentData } from '../../../shared/kernel'; import { ColorValue, Datum, Pixels, Fraction, Styler } from '../../../shared/options'; /** * What a box-plot tooltip is handed: a box is five numbers, and a renderer * that has to reach for them through `datum` would be doing the series' work. */ export interface BoxPlotTooltipRendererParams { datum: Datum; /** Value of xField — the category of the box. */ xValue: unknown; min: number; q1: number; median: number; q3: number; max: number; seriesName: string; color: ColorValue; } /** What the item styler of a box is handed: the five numbers it is drawn from. */ export interface BoxPlotItemStylerParams extends RectItemStylerParams { min: number; q1: number; median: number; q3: number; max: number; } /** The style of one box: its fill, and the stroke of the whole glyph — whiskers, caps and median alike. */ export type BoxPlotItemStyle = Omit; export interface BoxPlotSeriesOptions extends Omit, 'yField' | 'name'> { type: 'box-plot'; minField: string; q1Field: string; medianField: string; q3Field: string; maxField: string; name?: string; fill?: ColorValue; fillOpacity?: Fraction; stroke?: ColorValue; strokeWidth?: Pixels; /** Whisker cap width as a fraction of the box width. */ capLengthRatio?: Fraction; /** * Gap between boxes of one category group — fraction of the slot step * (0–0.9, default 0.2). Ignored when the series is alone in the band. */ groupGap?: Fraction; /** * Style of one box by its datum. Undefined leaves the box as it is; a * partial style is laid over it. */ itemStyler?: Styler; } export declare class BoxPlotSeries extends CartesianSeries { readonly type = "box-plot"; private boxes; protected mainColor(): ColorValue; protected get seriesName(): string; /** How a box is painted, in the state it is in: the series style with the item styler over it. */ private itemStyle; /** The five numbers of a box, in order; NaN where a field is missing. */ private statsOf; occupiesBandSlot(): boolean; yDomain(data: Datum[]): [number, number] | undefined; axisKeys(): string[]; update(ctx: CartesianRenderContext): void; pick(x: number, y: number): SeriesPick | undefined; nodeAt(datumIndex: number): SeriesPick | undefined; tooltipFor(datumIndex: number): TooltipContentData; } export declare const boxPlotSeriesModule: SeriesModule;