@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.
13 lines (12 loc) • 536 B
TypeScript
import type { ChartBounds, ChartValue } from './types.js';
export declare const resolveDotLayout: unique symbol;
export interface DotLayoutResolveContext {
readonly chart: ChartBounds;
readonly measuredPositions: readonly number[];
readonly radii: readonly number[];
}
export interface DotLayout<TAxis extends 'x' | 'y' = 'x' | 'y', TAnchor extends ChartValue = ChartValue> {
readonly axis: TAxis;
readonly anchor: TAnchor;
readonly [resolveDotLayout]: (context: DotLayoutResolveContext) => readonly number[];
}