import type { ReactNode } from 'react'; import type { CSSProperties } from 'react'; import type { SxProp } from '../Layout/sx.js'; export interface PieDatum { label: string; value: number; color?: string; } export interface PieChartProps { data: PieDatum[]; height?: number; /** Accessible label for the chart (svg `aria-label` + hidden table caption). */ label?: string; /** Inner radius as a fraction of the outer radius (0 = pie, 0.6 = donut). */ innerRadius?: number; legend?: boolean; /** Clicking a legend entry hides / shows that slice. Default `true`. */ legendToggle?: boolean; /** Content shown instead of the chart when there is no data. Default "No data". */ empty?: ReactNode; /** Custom tooltip body for a hovered slice. */ renderTooltip?: (params: { datum: PieDatum; percent: number; }) => ReactNode; /** * Center label (e.g. a total) for donut charts. May be a function receiving the hole's * pixel `diameter` so the content can size itself. */ centerLabel?: ReactNode | ((params: { diameter: number; }) => ReactNode); /** * Max slices drawn; the smallest are grouped into one "Other" slice (a toggle expands * them). Default `10`; `0` or `Infinity` disables grouping. */ maxSlices?: number; /** Label of the grouped slice. Default "Other". */ otherLabel?: string; /** Format values in the tooltip. Default: grouped thousands, compact above a billion. */ valueFormatter?: (value: number) => string; /** Entrance animation (and smooth transitions when data changes). Default `true`; off under reduced motion and for very large charts. */ animate?: boolean; className?: string; style?: CSSProperties; /** * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx * merges into inline style; responsive sx injects a scoped class. Applied to * the chart's outer container. */ sx?: SxProp; } /** Share as text: "<0.1%" / "0.4%" for tiny slices, whole percent otherwise. */ export declare function formatShare(frac: number): string; export declare function PieChart({ data, height, label, innerRadius, legend, legendToggle, empty, renderTooltip, centerLabel, maxSlices, otherLabel, valueFormatter, animate, className, style, sx, }: PieChartProps): import("react/jsx-runtime").JSX.Element;