UNPKG

@tanstack/charts

Version:

A chart grammar for TypeScript and JavaScript. Marks consume your data directly, channels describe visual encodings, and the engine compiles them into a renderer-neutral keyed scene. TanStack's compact scales cover common numeric and categorical mappings.

18 lines (17 loc) 688 B
import type { StackOptions } from './stack.js'; import type { ChartKey, ChartValue } from './types.js'; export interface StackInput { index: number; position: ChartValue; value: number; series: ChartKey; } export interface StackExtent { start: number; end: number; } export declare function stackExtents(input: readonly StackInput[], options?: Readonly<StackOptions>): Map<number, StackExtent>; export declare function stackValues(positions: readonly unknown[], values: readonly unknown[], series: readonly unknown[], options?: Readonly<StackOptions>, fallbackSeries?: 'value' | 'index'): { starts: (number | undefined)[]; ends: (number | undefined)[]; };