@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.
7 lines (6 loc) • 533 B
TypeScript
import type { ResolvedScale } from './types.js';
/** Smallest positive distance between distinct mapped semantic values. */
export declare function minimumMappedSpacing(scale: ResolvedScale, values: readonly unknown[]): number | undefined;
/** Category step from the complete scale domain, with a bounded singleton fallback. */
export declare function resolvedCategoryStep(scale: ResolvedScale, plotSpan: number, fitUnits?: number): number;
export declare function isResolvedCategoryScale(scale: ResolvedScale | undefined): boolean;