UNPKG

react-native-chart-kit

Version:

Beautiful React Native charts for dashboards, reports, and data-rich mobile apps.

26 lines 1.47 kB
import type { PieArcModel } from "../../../core/index"; import type { PieChartInteraction, PieChartInteractionConfig, PieChartSelectEvent } from "./types"; type PieChartPoint = { locationX: number; locationY: number; }; type PieChartHitTestOptions<TData = unknown> = PieChartPoint & { arcs: Array<PieArcModel<TData>>; centerX: number; centerY: number; innerRadius: number; radius: number; }; export type ResolvedPieChartInteractionConfig<TData = unknown> = { mode: "none" | "tap"; deselectOnOutsidePress: boolean; onDeselect: PieChartInteractionConfig<TData>["onDeselect"] | undefined; onSelect: PieChartInteractionConfig<TData>["onSelect"] | undefined; }; export declare const getPieChartInteractionConfig: <TData>(interaction?: PieChartInteraction<TData> | undefined) => ResolvedPieChartInteractionConfig<TData>; export declare const isPieChartInteractionEnabled: <TData>(config: ResolvedPieChartInteractionConfig<TData>) => boolean; export declare const normalizePieChartSelectedIndex: (selectedIndex: number | undefined) => number | undefined; export declare const getPieChartSliceAtPoint: <TData>({ arcs, centerX, centerY, innerRadius, locationX, locationY, radius }: PieChartHitTestOptions<TData>) => PieArcModel<TData> | undefined; export declare const buildPieChartSelectEvent: <TData>(arc: PieArcModel<TData> | undefined) => PieChartSelectEvent<TData> | undefined; export {}; //# sourceMappingURL=interaction.d.ts.map