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.

10 lines (9 loc) 745 B
import type { ChartBounds, ChartMargin, ChartTextMeasurer, ChartTextMeasureOptions, ChartTextMetrics, ChartTextTypography, SceneGroup, SceneLabel } from './types.js'; export interface GuideMarginOptions { inset?: number; measureText?: ChartTextMeasurer; } export declare function estimateSceneText(text: string, style: ChartTextMeasureOptions): ChartTextMetrics; export declare function measureSceneLabelBounds(label: SceneLabel, measureText?: ChartTextMeasurer): ChartBounds; export declare function withChartTextTypography(measureText?: ChartTextMeasurer, typography?: ChartTextTypography): ChartTextMeasurer; export declare function resolveGuideMargins(axes: SceneGroup, plot: ChartBounds, options?: GuideMarginOptions): ChartMargin;