import { PrismFaces } from './depth'; import { NormalizedRow } from './normalize'; /** Pixel mappings a range mark draws with. */ export interface RangeScales { x: (value: number) => number; y: (value: number) => number; xDomain: readonly [number, number]; /** Width of one observation's column in pixels. */ columnWidth: number; } /** * Throws when a present row breaks the order a mark relies on, e.g. low ≤ high. Rows missing * any listed value are gaps and skip the check. */ export declare function assertOrdered(mark: string, rows: readonly NormalizedRow[], series: string, ids: readonly (string | { value: true; })[]): void; /** Closed band paths between two fields, split wherever a row lacks either edge. */ export declare function bandPaths(rows: readonly NormalizedRow[], series: string, lower: string, upper: string, scales: RangeScales): string[]; /** A rounded rectangle as path data; the radius shrinks to fit. */ export declare function roundedRect(x: number, y: number, width: number, height: number, radius: number): string; /** A dot as path data, so many dots share one path element. */ export declare function dotPath(x: number, y: number, radius: number): string; /** Path data grouped by color, so a mark draws one element per color. */ export declare class ColorBatches { private readonly batches; add(color: string, path: string): void; entries(): { color: string; d: string; }[]; } /** Prism faces batched by color: every side, then every top, then every front. */ export declare class PrismBatches { readonly sides: ColorBatches; readonly tops: ColorBatches; readonly fronts: ColorBatches; add(color: string, faces: PrismFaces): void; } /** Column geometry shared by candles and range marks: center and body width per row. */ export declare function columnFrame(scales: RangeScales): { width: number; half: number; }; export interface RangeColumn { row: NormalizedRow; cx: number; } /** Rows in view with their pixel centers. */ export declare function columnsInView(rows: readonly NormalizedRow[], scales: RangeScales): RangeColumn[]; /** One floating bar from low to high as a prism; its front spans exactly low to high. */ export declare function rangeBarPrism(cx: number, low: number, high: number, scales: RangeScales): PrismFaces; /** One floating bar from low to high. */ export declare function rangeBarPath(cx: number, low: number, high: number, scales: RangeScales): string; /** A whisker from low to high with caps a little narrower than the column. */ export declare function whiskerPath(cx: number, low: number, high: number, scales: RangeScales): string; export interface BoxShape { box: string; median: string; whiskers: string; } /** A box from q1 to q3 with a median line and capped whiskers to min and max. */ export declare function boxShape(cx: number, values: { min: number; q1: number; median: number; q3: number; max: number; }, scales: RangeScales): BoxShape; /** * A box plot drawn as a solid block. The block's middle, not its front, sits on the reading, so * the whiskers run through the center of its top and bottom faces, half the depth back. The * front still spans exactly Q1 to Q3, and the median wraps from the front around the side. */ export declare function boxBlock(cx: number, values: { min: number; q1: number; median: number; q3: number; max: number; }, scales: RangeScales): { faces: PrismFaces; /** How far the whiskers and outliers sit above their values: half the depth back. */ lift: number; median: string; /** Drawn before the block, which hides where it leaves the bottom face. */ lower: string; /** Drawn after the block, rising from the middle of its top face. */ upper: string; };