import { NormalizedData } from './normalize'; import { StackMode } from './stack'; export interface DecimateOptions { /** Series drawn as lines or areas, in chart order. Bars are drawn per row and left out. */ lines: readonly string[]; /** Stacked layers, in drawing order, whose cumulative boundaries are what the plot draws. */ stack?: { series: readonly string[]; mode: StackMode; weights?: Readonly>; }; xDomain: readonly [number, number]; /** Maps a row's x to its screen pixel. */ xToPixel: (x: number) => number; } /** * The rows worth drawing when a series has more rows than the plot has pixels (M4): in each pixel * column, every drawn line's first, last, lowest and highest row. That traces the same ink as * every row would, and every kept row is a real observation. Rows at the edge of a gap or a * change of status are always kept, so gaps and provisional runs never close up. * * Returns null when thinning would not save much; the caller then draws every row. Only drawing * uses the result: inspection, values and exports keep reading every row. */ export declare function decimateRows(data: NormalizedData, options: DecimateOptions): NormalizedData | null;