import type { TransformLineage, TransformValue, TransformValueOutput } from './transform.js'; import type { Channel, CartesianScaleBindings, ChartKey, ChartMark, ChartMotionDefinition, ChartMarkMotionOptions, ChartValue, OptionChannelOutput } from './types.js'; export interface BoxSummaryDatum extends TransformLineage { readonly kind: 'summary'; readonly category: TCategory; readonly q1: number; readonly median: number; readonly q3: number; readonly whiskerLow: number; readonly whiskerHigh: number; readonly count: number; } export interface BoxOutlierDatum extends TransformLineage { readonly kind: 'outlier'; readonly category: TCategory; readonly value: number; readonly source: readonly [TDatum]; readonly sourceIndexes: readonly [number]; } export type BoxDatum = BoxSummaryDatum | BoxOutlierDatum; export interface BoxRowsOptions = TransformValue, TValue extends TransformValue = TransformValue> { /** Categorical group represented by one summary row. */ readonly category: TCategory; /** Numeric observation summarized within its category. */ readonly value: TValue; } interface BoxOptions extends ChartMarkMotionOptions> { id?: string; key?: Channel; fill?: string; fillOpacity?: number; stroke?: string; strokeOpacity?: number; /** Applied to the whisker, median, and outlier marks. */ strokeWidth?: number; /** Pixels removed from both categorical edges of the box and median. */ inset?: number; /** Outlier radius in pixels. Defaults to 3. */ r?: number; xScale?: CartesianScaleBindings['xScale']; yScale?: CartesianScaleBindings['yScale']; } export interface BoxYOptions extends BoxOptions { x: Channel; y: Channel; } export interface BoxXOptions extends BoxOptions { x: Channel; y: Channel; } export type BoxYDatum = BoxDatum>; export type BoxXDatum = BoxDatum>; type BoxYCallOptions, ChartValue | null | undefined>> = Omit>, 'motion' | 'x'> & { x: TXChannel; motion?: ChartMotionDefinition>; }; type BoxXCallOptions, ChartValue | null | undefined>> = Omit>, 'motion' | 'y'> & { y: TYChannel; motion?: ChartMotionDefinition>; }; /** Produces Tukey summary and outlier rows with direct source lineage. */ export declare function boxRows, const TValue extends TransformValue>(source: Iterable, options: BoxRowsOptions): BoxDatum, ChartValue>>[]; /** Summarizes raw observations into vertical Tukey boxplots. */ export declare function boxY, ChartValue | null | undefined>, const TXScaleId extends string = 'x', const TYScaleId extends string = 'y'>(source: Iterable, options: BoxYCallOptions & { xScale?: TXScaleId; yScale?: TYScaleId; }): ChartMark, OptionChannelOutput, number, OptionChannelOutput, number, TXScaleId, TYScaleId>; /** Summarizes raw observations into horizontal Tukey boxplots. */ export declare function boxX, ChartValue | null | undefined>, const TXScaleId extends string = 'x', const TYScaleId extends string = 'y'>(source: Iterable, options: BoxXCallOptions & { xScale?: TXScaleId; yScale?: TYScaleId; }): ChartMark, number, OptionChannelOutput, number, OptionChannelOutput, TXScaleId, TYScaleId>; export {};