react-circle-chart
Version:
Simple React donut chart component with flexible options.
26 lines (25 loc) • 841 B
TypeScript
/// <reference types="react" />
import * as CSS from "csstype";
interface Item {
value: number;
label: string;
color?: string;
displayValue?: string;
}
declare type DonutChartProps = {
items?: Item[];
roundedCaps?: boolean;
size?: "sm" | "md" | "lg" | number;
trackWidth?: "sm" | "md" | "lg";
trackColor?: string;
showTotal?: boolean;
totalFontSize?: string;
totalTextColor?: string;
tooltipColor?: string;
backgroundTooltipColor?: string;
tooltipFontSize?: string;
tooltipSx?: CSS.Properties;
totalSx?: CSS.Properties;
};
export declare const DonutChart: ({ items, roundedCaps, size, trackWidth, trackColor, showTotal, totalTextColor, totalFontSize, backgroundTooltipColor, tooltipFontSize, tooltipColor, tooltipSx, totalSx, }: DonutChartProps) => JSX.Element;
export {};