import { type FC, type HTMLAttributes, type Ref } from 'react'; import { type TestableProps } from '../../../utils/testId'; import { type PieChartDatum } from './PieChartContext'; export interface PieChartProps extends HTMLAttributes, TestableProps { ref?: Ref; /** * Each datum's `name` is the join key used by `PieChartLegendItem` to sync hover/active state. * Non-finite or negative `value`s are coerced to 0 so recharts can draw them. */ data: PieChartDatum[]; /** * Override for the value used to compute percentages and the centre total. * Defaults to `sum(data.value)`. Pass an explicit value when the centre label * should reflect a different denominator — e.g. the unfiltered total while * the chart shows a filtered view. */ total?: number; /** * Controlled active slice. When provided, the component does not manage hover state * internally — the parent must update it via `onActiveNameChange`. */ activeName?: string | null; onActiveNameChange?: (name: string | null) => void; /** * Multi-selection set. When non-empty, donut slices and legend rows whose `name` * is not in the set fade so emphasis lands on the chosen group. Hover * (`activeName`) wins — while the user points at a specific slice, only that one * stays bright. Names not present in `data` are ignored. * * Pass a stable reference (`useMemo`/state) — an inline array literal recreates * on every parent render and invalidates the internal Set memo. */ selectedNames?: string[]; } export declare const PieChart: FC;