@actinc/dls
Version:
Design Language System (DLS) for ACT & Encoura front-end projects.
43 lines • 1.77 kB
TypeScript
/**
* Copyright (c) ACT, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { TypographyProps } from '@mui/material';
import React from 'react';
import { LegendProps, PieProps, ResponsiveContainerProps, TooltipProps } from 'recharts';
import { CategoricalChartProps } from 'recharts/types/chart/generateCategoricalChart';
import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
import { VariantType } from "../../types";
import { CustomLegendComponentType, HighlightComponentType, PieDataProps as TypesPieDataProps } from './types';
type TitleProps = TypographyProps & {
title: string;
};
export type PieDataProps = TypesPieDataProps;
export interface PieChartProps {
chartLegendTextFontSize?: number | string;
chartLegendTextFontSizeSmall?: number | string;
children?: React.ReactElement<unknown>;
colors?: string[];
CustomLegendIcon?: CustomLegendComponentType;
data: Array<TypesPieDataProps>;
height?: number;
HighlightComponent?: HighlightComponentType;
legendProps?: LegendProps;
pieChartProps?: CategoricalChartProps;
pieProps?: Partial<PieProps>;
responsiveContainerProps?: ResponsiveContainerProps;
titleProps?: Partial<TitleProps>;
tooltipProps?: TooltipProps<ValueType, NameType>;
variant?: VariantType;
width?: number | string;
}
export declare const DEFAULT_PIE_GAP_ANGLE = 1;
export declare const DEFAULT_PIE_MIN_ANGLE = 1;
/**
* The existence of HighlightComponent will automatically push the Legend from inside the PieChart
*/
export declare const PieChart: React.FC<PieChartProps>;
export default PieChart;
//# sourceMappingURL=index.d.ts.map