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.

16 lines (15 loc) 1.55 kB
import type { ChartCursorPresentation, ChartFocusAnchor, ChartFocusPresentation, ChartFocusState, ChartScene, ChartTooltipPosition, SceneGroup, SceneNode } from './types.js'; export interface ResolvedFocusScene<TScene extends ChartScene = ChartScene> { scene: TScene; retargeted: boolean; } export declare function resolveFocusPresentation(scene: ChartScene, focus: ChartFocusState | null, pointer?: ChartTooltipPosition | null, cursor?: ChartCursorPresentation | null): ChartFocusPresentation; /** Resolves only renderer-native guide marks, excluding authored focus layers. */ export declare function resolveFocusGuides(scene: ChartScene, focus: ChartFocusState | null, pointer?: ChartTooltipPosition | null, cursor?: ChartCursorPresentation | null): ChartFocusPresentation; /** Resolves retargeting focus candidates into stable selected scene children. */ export declare function resolveFocusScene<TScene extends ChartScene>(scene: TScene, focus: ChartFocusState | null): ResolvedFocusScene<TScene>; export declare function focusedSceneNodes(scene: ChartScene, focus: ChartFocusState | null, placement: 'under' | 'over'): SceneNode[]; export declare function focusedNodeKeys(layer: SceneGroup, focus: ChartFocusState | null): Set<string>; export declare function matchesFocusAnchor(candidate: ChartFocusAnchor, focus: ChartFocusState, match: NonNullable<SceneGroup['focus']>['match']): boolean; /** @deprecated Use `matchesFocusAnchor`; points are valid focus anchors. */ export declare const matchesFocusPoint: typeof matchesFocusAnchor;