@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) • 869 B
TypeScript
import type { ChartRenderer, ChartRendererHost, ChartRendererHostOptions } from './dom-types.js';
import type { ChartRuntime, ChartScene, ChartValue } from './types.js';
export declare function resolveChartRenderer(scene: ChartScene<any, any, any>, defaultRenderer: ChartRenderer<any, any, any>): ChartRenderer<any, any, any>;
/**
* Mounts a chart and owns the runtime until the returned host is destroyed.
* Pass a runtime that already rendered initial markup to preserve renderer
* handoff state across adapter prerender and DOM mounting.
*/
export declare function mountChartRenderer<TDatum, TXValue extends ChartValue = ChartValue, TYValue extends ChartValue = ChartValue>(container: HTMLElement, initialOptions: ChartRendererHostOptions<TDatum, TXValue, TYValue>, runtime?: ChartRuntime<TDatum, TXValue, TYValue>): ChartRendererHost<TDatum, TXValue, TYValue>;