@tanstack/charts
Version:
<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/api/readme/charts.png?theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/
13 lines (12 loc) • 1.14 kB
TypeScript
import type { TemplateResult } from 'lit';
import type { ChartHostCommonOptions, ChartHostOptions, ChartTooltipBodyContext, ChartValue } from '@tanstack/charts';
export interface ChartTooltipBodyRenderContext<TDatum = unknown, TXValue extends ChartValue = ChartValue, TYValue extends ChartValue = ChartValue> extends ChartTooltipBodyContext<TDatum, TXValue, TYValue> {
defaultBody: TemplateResult;
}
export interface ChartPresentationProps<TDatum = unknown, TXValue extends ChartValue = ChartValue, TYValue extends ChartValue = ChartValue> {
class?: string;
style?: string;
renderTooltipBody?: (context: ChartTooltipBodyRenderContext<TDatum, TXValue, TYValue>) => unknown;
}
export type ChartCommonProps<TDatum = unknown, TXValue extends ChartValue = ChartValue, TYValue extends ChartValue = ChartValue> = ChartHostCommonOptions<TDatum, TXValue, TYValue> & ChartPresentationProps<TDatum, TXValue, TYValue>;
export type ChartProps<TDatum = unknown, TXValue extends ChartValue = ChartValue, TYValue extends ChartValue = ChartValue> = ChartHostOptions<TDatum, TXValue, TYValue> & ChartPresentationProps<TDatum, TXValue, TYValue>;