UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

67 lines 2.23 kB
import * as React from 'react'; import { type PieItemId } from "../models/index.js"; export interface PieArcClasses { /** Styles applied to the root element. */ root: string; /** Styles applied to the root element when highlighted. */ highlighted: string; /** Styles applied to the root element when faded. */ faded: string; /** * Styles applied to the root element for a specified series. * Needs to be suffixed with the series ID: `.${pieArcClasses.series}-${seriesId}`. */ series: string; /** Styles applied to the focus indicator element. */ focusIndicator: string; } export type PieArcClassKey = keyof PieArcClasses; interface PieArcOwnerState { id: PieItemId; dataIndex: number; color: string; isFaded: boolean; isHighlighted: boolean; isFocused: boolean; stroke?: string; classes?: Partial<PieArcClasses>; } export declare function getPieArcUtilityClass(slot: string): string; export declare const pieArcClasses: PieArcClasses; export type PieArcProps = Omit<React.SVGProps<SVGPathElement>, 'ref' | 'id'> & PieArcOwnerState & { cornerRadius: number; endAngle: number; innerRadius: number; onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void; outerRadius: number; paddingAngle: number; startAngle: number; /** * If `true`, the animation is disabled. */ skipAnimation?: boolean; /** * If `true`, the default event handlers are disabled. * Those are used, for example, to display a tooltip or highlight the arc on hover. */ skipInteraction?: boolean; }; declare const PieArc: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGPathElement>, "ref" | "id"> & PieArcOwnerState & { cornerRadius: number; endAngle: number; innerRadius: number; onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void; outerRadius: number; paddingAngle: number; startAngle: number; /** * If `true`, the animation is disabled. */ skipAnimation?: boolean; /** * If `true`, the default event handlers are disabled. * Those are used, for example, to display a tooltip or highlight the arc on hover. */ skipInteraction?: boolean; } & React.RefAttributes<SVGPathElement>>; export { PieArc };