import { RadialChartData } from "../types"; export interface RadialChartDimensions { outerRadius: number; innerRadius: number; } export interface RadialHoverStyles { opacity: number; stroke: string; strokeWidth: number; } export interface RadialChartHoverHook { activeIndex: number | null; handleMouseEnter: (event: any, index: number) => void; handleMouseLeave: () => void; } export interface RadialAnimationConfig { isAnimationActive: boolean; animationBegin: number; animationDuration: number; animationEasing: "ease" | "ease-in" | "ease-out" | "ease-in-out" | "linear"; } /** * Calculates the percentage value of a number relative to a total * @param value - The value to calculate percentage for * @param total - The total value to calculate percentage against * @returns The calculated percentage rounded to 2 decimal places */ export declare const calculatePercentage: (value: number, total: number) => number; /** * Calculates dimensions for radial charts based on container size * @param width - The container width * @param variant - The chart variant ('semicircle' or 'circular') * @returns Object containing outer and inner radius values */ export declare const calculateRadialChartDimensions: (width: number) => RadialChartDimensions; /** * Generates hover style properties for radial chart cells * @param index - The index of the current cell * @param activeIndex - The index of the currently hovered cell * @returns Object containing hover style properties */ export declare const getRadialHoverStyles: (index: number, activeIndex: number | null) => RadialHoverStyles; /** * Transforms data by adding percentage calculations and colors * @param data - The input data array * @param dataKey - The key to use for value calculations * @param theme - The color theme to use * @returns Transformed data with added percentage, original value, and fill color */ export declare const transformRadialDataWithPercentages: (data: T, dataKey: keyof T[number], colors: string[]) => { percentage: number; originalValue: string | number | undefined; fill: string | undefined; }[]; /** * Custom hook for managing radial chart hover effects * @returns Object containing hover state and handlers */ export declare const useRadialChartHover: () => RadialChartHoverHook; /** * Creates animation configuration for radial chart * @param config - Animation configuration options * @returns Animation configuration object */ export declare const createRadialAnimationConfig: (config?: Partial) => RadialAnimationConfig; /** * Creates event handlers for radial chart * @param onMouseEnter - Mouse enter handler * @param onMouseLeave - Mouse leave handler * @param onClick - Click handler * @returns Object containing event handlers */ export declare const createRadialEventHandlers: (onMouseEnter?: (data: any, index: number) => void, onMouseLeave?: () => void, onClick?: (data: any, index: number) => void) => { onMouseEnter: ((data: any, index: number) => void) | undefined; onMouseLeave: (() => void) | undefined; onClick: ((data: any, index: number) => void) | undefined; }; export declare const transformRadialData: (data: T, dataKey: keyof T[number], colors: string[]) => { percentage: number; originalValue: string | number | undefined; fill: string | undefined; }[]; export declare const useChartHover: () => RadialChartHoverHook; export declare const getHoverStyles: (index: number, activeIndex: number | null) => RadialHoverStyles; //# sourceMappingURL=RadialChartUtils.d.ts.map