import * as React from "react"; import { Card } from "@/components/ui/card"; export type ChartDatum = { label: React.ReactNode; value: number; description?: React.ReactNode; color?: string; }; export type ChartSeries = { key: string; label: React.ReactNode; data: number[]; color?: string; }; export type ChartCurve = "linear" | "monotone" | "natural" | "step"; export type ChartAxisLabel = string | number | React.ReactNode; export type ChartSize = "sm" | "md" | "lg"; export type ChartState = "ready" | "loading" | "empty"; export type ChartDomain = [number | "auto" | "dataMin", number | "auto" | "dataMax"]; export type ChartTooltipContentProps = { active?: boolean; label?: React.ReactNode; payload?: ReadonlyArray<{ value?: number | string; color?: string; name?: string; payload?: { description?: React.ReactNode; originalLabel?: React.ReactNode; }; }>; valueFormatter?: (value: number) => React.ReactNode; labelFormatter?: (label: React.ReactNode) => React.ReactNode; }; declare function ChartTooltipContent({ active, label, payload, valueFormatter, labelFormatter }: ChartTooltipContentProps): React.JSX.Element | null; export type ChartFrameProps = React.ComponentProps & { title?: React.ReactNode; description?: React.ReactNode; action?: React.ReactNode; state?: ChartState; emptyLabel?: React.ReactNode; }; declare function ChartFrame({ title, description, action, state, emptyLabel, className, children, ...props }: ChartFrameProps): React.JSX.Element; export type BarChartProps = React.ComponentProps<"div"> & { data?: ChartDatum[]; series?: ChartSeries[]; labels?: ChartAxisLabel[]; size?: ChartSize; max?: number; showLabels?: boolean; showValues?: boolean; showGrid?: boolean; showTooltip?: boolean; valueFormatter?: (value: number) => React.ReactNode; state?: ChartState; emptyLabel?: React.ReactNode; barClassName?: string; domain?: ChartDomain; ariaLabel?: string; stacked?: boolean; showLegend?: boolean; barRadius?: number; }; declare function BarChart({ data, series, labels: customLabels, size, max, showLabels, showValues, showGrid, showTooltip, valueFormatter, state, emptyLabel, barClassName, domain, ariaLabel, stacked, showLegend, barRadius, className, ...props }: BarChartProps): React.JSX.Element; export type LineChartProps = Omit, "children"> & { values?: number[]; series?: ChartSeries[]; size?: ChartSize; width?: number; height?: number; showArea?: boolean; showGrid?: boolean; showAxis?: boolean; showTooltip?: boolean; labels?: ChartAxisLabel[]; valueFormatter?: (value: number) => React.ReactNode; stroke?: string; state?: ChartState; emptyLabel?: React.ReactNode; domain?: ChartDomain; ariaLabel?: string; curve?: ChartCurve; showDots?: boolean; showLegend?: boolean; gradient?: boolean; strokeWidth?: number; }; declare function LineChart({ values, series, size, width, height: heightProp, showArea, showGrid, showAxis, showTooltip, labels, valueFormatter, stroke, state, emptyLabel, domain, ariaLabel, curve, showDots, showLegend, gradient, strokeWidth, className, style, ...props }: LineChartProps): React.JSX.Element; declare function AreaChart(props: Omit): React.JSX.Element; export type SparklineProps = Omit & { values: number[]; positive?: boolean; }; declare function Sparkline({ values, positive, stroke, className, showTooltip, ...props }: SparklineProps): React.JSX.Element; export type DonutChartProps = Omit, "children"> & { data: ChartDatum[]; size?: number; strokeWidth?: number; centerLabel?: React.ReactNode; centerValue?: React.ReactNode; state?: ChartState; emptyLabel?: React.ReactNode; showTooltip?: boolean; valueFormatter?: (value: number) => React.ReactNode; ariaLabel?: string; }; declare function DonutChart({ data, size, strokeWidth, centerLabel, centerValue, state, emptyLabel, showTooltip, valueFormatter, ariaLabel, className, style, ...props }: DonutChartProps): React.JSX.Element; export type ChartLegendProps = React.ComponentProps<"div"> & { data: ChartDatum[]; }; declare function ChartLegend({ data, className, ...props }: ChartLegendProps): React.JSX.Element; export type MetricTrendProps = React.ComponentProps<"div"> & { label: React.ReactNode; value: React.ReactNode; change?: React.ReactNode; positive?: boolean; values?: number[]; }; declare function MetricTrend({ label, value, change, positive, values, className, ...props }: MetricTrendProps): React.JSX.Element; export { AreaChart, BarChart, ChartFrame, ChartLegend, ChartTooltipContent, DonutChart, LineChart, MetricTrend, Sparkline };