import * as RechartsPrimitive from "recharts"; /** * @module Charts * A collection of chart components built on top of Recharts with enhanced styling and theming capabilities. */ /** * Available themes for chart customization * @constant * @type {Record<'light' | 'dark', string>} */ declare const THEMES: { readonly light: ""; readonly dark: ".dark"; }; /** * Configuration type for chart elements */ export type ChartConfig = { [k in string]: { label?: React.ReactNode; icon?: React.ComponentType; transformed?: string; } & ({ color?: string; secondaryColor?: string; theme?: never; } | { color?: never; theme: Record; }); }; /** * Data structure for chart export (e.g., to PPTX) */ export type ExportChartData = { type: "line" | "bar" | "area" | "pie" | "radar" | "scatter"; data: { name: string; labels?: string[]; values?: number[]; x?: number[]; y?: number[]; }[]; options?: { chartColors?: string[]; showLegend?: boolean; legendPos?: "b" | "t" | "l" | "r"; title?: string; showTitle?: boolean; catAxisTitle?: string; showCatAxisTitle?: boolean; valAxisTitle?: string; showValAxisTitle?: boolean; lineSize?: number; barDir?: "bar" | "col"; barGrouping?: "stacked" | "clustered" | "percent" | "standard"; }; }; /** * Context props for chart configuration */ type ChartContextProps = { config: ChartConfig; id: string; }; /** * Hook to access chart context * @throws Error if used outside of ChartContainer */ declare function useChart(): ChartContextProps; /** * Component that generates theme-specific styles for chart elements */ declare const ChartStyle: ({ id, config }: { id: string; config: ChartConfig; }) => import("react/jsx-runtime").JSX.Element | null; /** * Container component for charts that provides configuration context and styling */ declare const ChartContainer: import("react").ForwardRefExoticComponent & import("react").HTMLAttributes & { config: ChartConfig; children: React.ComponentProps["children"]; rechartsProps?: Omit, "children">; }, "ref"> & import("react").RefAttributes>; /** * Re-exported Tooltip component from Recharts */ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip; /** * Custom tooltip content component with enhanced styling and formatting */ type ChartTooltipContentProps = React.ComponentProps & React.ComponentProps<"div"> & { hideLabel?: boolean; hideIndicator?: boolean; indicator?: "line" | "dot" | "dashed"; nameKey?: string; labelKey?: string; showPercentage?: boolean; }; declare const ChartTooltipContent: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; /** * Re-exported Legend component from Recharts */ declare const ChartLegend: typeof RechartsPrimitive.Legend; /** * Custom legend content component with enhanced styling */ declare const ChartLegendContent: import("react").ForwardRefExoticComponent & import("react").HTMLAttributes & Pick & { hideIcon?: boolean; nameKey?: string; }, "ref"> & import("react").RefAttributes>; /** * Helper function to extract configuration for a chart element from a payload */ declare function getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string): ({ label?: React.ReactNode; icon?: React.ComponentType; transformed?: string; } & ({ color?: string; secondaryColor?: string; theme?: never; } | { color?: never; theme: Record; })) | undefined; export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, getPayloadConfigFromPayload, useChart, }; //# sourceMappingURL=Charts.d.ts.map