import type { ReactNode } from "react"; export type GenericChartDatum = Record; export type GenericChartType = "metric" | "line" | "area" | "bar" | "stacked-bar" | "stacked-area" | "pie" | "donut" | "table"; export interface GenericChartConfig { chartType: GenericChartType; xKey?: string; yKey?: string; yKeys?: string[]; colors?: string[]; stacked?: boolean; legend?: boolean; description?: string; columns?: string[]; limit?: number; formatValue?: (value: number) => string; formatXAxis?: (value: string) => string; formatSeriesName?: (value: string) => string; } export interface GenericChartRenderContext { data: TData; config: TConfig; } export interface GenericChartPanelProps { data: TData | null | undefined; config: TConfig; loading?: boolean; error?: ReactNode; isEmpty?: (data: TData) => boolean; /** App-specific rendering takes priority over the portable Recharts renderer. */ render?: (context: GenericChartRenderContext) => ReactNode; /** Opt into Toolkit's source-agnostic Recharts renderer for row data. */ chart?: GenericChartConfig; renderLoading?: (config: TConfig) => ReactNode; renderError?: (error: ReactNode, config: TConfig) => ReactNode; renderEmpty?: (config: TConfig) => ReactNode; emptyMessage?: ReactNode; className?: string; } /** * A render-only chart state boundary. Data acquisition, query serialization, * demos, pivots, and app-specific chart renderers stay with the consuming app. */ export declare function GenericChartPanel({ data, config, loading, error, isEmpty, render, chart, renderLoading, renderError, renderEmpty, emptyMessage, className, }: GenericChartPanelProps): import("react").JSX.Element | null; /** Derives chart axes from provider-neutral row data when keys are not configured. */ export declare function resolveGenericChartKeys(rows: GenericChartDatum[], config: Pick): { xKey: string; yKeys: string[]; }; export declare function formatGenericChartValue(value: unknown): string; export declare function GenericChartRenderer({ rows, config, }: { rows: GenericChartDatum[]; config: GenericChartConfig; }): import("react").JSX.Element; export declare function ChartPanelPlaceholder({ className }: { className?: string; }): import("react").JSX.Element; //# sourceMappingURL=GenericChartPanel.d.ts.map