import { ComponentProps, CSSProperties, ReactNode } from 'react'; import { ResponsiveContainer, Tooltip, Legend } from 'recharts'; export type ChartConfig = { [k in string]: { label?: ReactNode; icon?: ReactNode; /** A CSS color or `var(--token)`. Use a token for light/dark theming. */ color?: string; }; }; declare function colorVarsFromConfig(config: ChartConfig): CSSProperties; type ChartA11yProps = { 'aria-label': string; 'aria-labelledby'?: never; } | { 'aria-labelledby': string; 'aria-label'?: never; }; type ChartContainerProps = Omit, 'aria-label' | 'aria-labelledby'> & ChartA11yProps & { config: ChartConfig; children: ComponentProps['children']; }; declare function ChartContainer({ id, className, children, config, style, role, ...props }: ChartContainerProps): ReactNode; declare const ChartTooltip: typeof Tooltip; type TooltipPayloadItem = { type?: string; name?: string | number; dataKey?: string | number; value?: string | number; color?: string; payload?: Record; fill?: string; [key: string]: unknown; }; type ChartTooltipContentProps = Omit, 'content' | 'formatter' | 'labelFormatter'> & { className?: string; labelClassName?: string; hideLabel?: boolean; hideIndicator?: boolean; indicator?: 'line' | 'dot' | 'dashed'; nameKey?: string; labelKey?: string; payload?: TooltipPayloadItem[]; label?: string | number; color?: string; formatter?: (value: string | number, name: string | number, item: TooltipPayloadItem, index: number, payload: Record | undefined) => ReactNode; labelFormatter?: (value: ReactNode, payload: TooltipPayloadItem[]) => ReactNode; /** Pass an i18n-aware formatter from your app's locale; defaults to the environment locale. */ valueFormatter?: (value: string | number) => string; }; declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, valueFormatter, }: ChartTooltipContentProps): ReactNode; declare const ChartLegend: typeof Legend; type LegendPayloadItem = { type?: string; value?: string; dataKey?: string | number; color?: string; [key: string]: unknown; }; type ChartLegendContentProps = { className?: string; hideIcon?: boolean; nameKey?: string; payload?: LegendPayloadItem[]; verticalAlign?: 'top' | 'bottom' | 'middle'; }; declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): ReactNode; declare function getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string): ChartConfig[string] | undefined; export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, colorVarsFromConfig, getPayloadConfigFromPayload, };