import React, { PureComponent } from "react";
import type { PieChartData } from "./types";
export interface PieChartProps {
/**
* The data to display in the chart
*/
data: PieChartData[];
/**
* Optional dimensions for the chart
*/
dimensions?: {
height?: number;
width?: number;
innerRadius?: number;
outerRadius?: number;
paddingAngle?: number;
cx?: string;
cy?: string;
};
/**
* If `true` will display a label for the pie pieces
* @default false
*/
label?: boolean | React.ReactElement;
/**
* If `true` will display a line to the label, only active with `label`
* @default false
*/
labelLine?: boolean;
/**
* If set, will display a label in the center of the pie chart (title) with an optional second label (subtitle)
*/
centerLabel?: {
title?: string;
subtitle?: string;
};
/**
* If `true` will display a legend for the chart
* @default false
*/
legend?: boolean;
/**
* Settings for responsive container
* @default true
*/
responsive?: boolean | {
width?: number | string;
height?: number | string;
aspect?: number;
};
/**
* It will display an active tooltip with changing text
* @default on
*/
activeTooltip?: boolean | {
staticLabel?: string;
payloadLabel?: string;
formatter?: (payload: any) => string;
};
/**
* If `true` will display a tooltip on hover over the chart slice
* @default false
*/
tooltip?: boolean;
/**
* (Optional) children to render inside of the , can reference API from
* Recharts (https://recharts.org/en-US/api/PieChart)
* These can override the Legend and Tooltip provided via the component
*/
children?: React.ReactChild | React.ReactChild[];
}
interface PieChartState {
activeIndex?: number;
}
declare class PieChart extends PureComponent {
constructor(props: any);
onPieEnter: (_: any, activeIndex: any) => void;
render(): JSX.Element;
}
export { PieChart };
//# sourceMappingURL=pie.d.ts.map