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.

12 lines (11 loc) 847 B
import type { ChartPoint, SceneNode } from './types.js'; export interface ScenePointLookup { points: readonly ChartPoint[]; keys: ReadonlyMap<string, readonly ChartPoint[]>; marks: ReadonlyMap<string, readonly ChartPoint[]>; } /** Indexes structural point identity without treating opaque keys as prefixes. */ export declare function createScenePointLookup(points: readonly ChartPoint[]): ScenePointLookup; /** Returns the semantic points explicitly or structurally owned by one node. */ export declare function sceneNodeOwnedPoints(node: SceneNode, scope: readonly ChartPoint[], lookup: ScenePointLookup, fallback?: readonly ChartPoint[]): readonly ChartPoint[]; export declare function sceneKeyOwnedPoints(key: string, scope: readonly ChartPoint[], lookup: ScenePointLookup, fallback?: readonly ChartPoint[]): readonly ChartPoint[];