@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.
18 lines (17 loc) • 628 B
TypeScript
import type { ChartColorLegend, ChartLegendPlacement } from './types.js';
export interface ColorLegendOptions {
label?: string;
itemWidth?: number;
width?: number;
format?: (value: number) => string;
placement?: ChartLegendPlacement;
}
export interface ColorGradientLegendOptions {
label?: string;
steps?: number;
width?: number;
format?: (value: number) => string;
placement?: ChartLegendPlacement;
}
export declare function colorLegend(options?: ColorLegendOptions): ChartColorLegend;
export declare function colorGradientLegend(options?: ColorGradientLegendOptions): ChartColorLegend;