UNPKG

@actinc/dls

Version:

Design Language System (DLS) for ACT & Encoura front-end projects.

57 lines 2.43 kB
/** * 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/Typography'; import React from 'react'; import { BarProps, CartesianGridProps, LabelListProps, ResponsiveContainerProps, XAxisProps, YAxisProps } from 'recharts'; import { CategoricalChartProps } from 'recharts/types/chart/generateCategoricalChart'; import { ILabelListData, TooltipPayloadProps, VariantType } from "../../types"; import { CustomizedAxisTickProps } from './CustomizedAxisTick'; import { CustomToolTipProps } from './CustomTooltip'; import { DataProps as ConsolidatedDataProps } from './types'; export type DataProps = ConsolidatedDataProps; export interface BarLabelProps { tooltipPayload: Array<TooltipPayloadProps>; width: number; } export interface BarChartProps { barKeys?: Array<string>; barProps?: Omit<BarProps, 'dataKey' | 'ref'>; cartesianGridProps?: CartesianGridProps; chartProps?: CategoricalChartProps; children?: React.ReactElement<unknown>; colors?: string[]; containerRef?: React.Ref<HTMLDivElement>; containerStyles?: React.CSSProperties; customizeBarFillColor?: (index: number, key: string) => string | undefined; customizedAxisTickProps?: CustomizedAxisTickProps; data: Array<DataProps>; description?: string; height?: number | ((calculatedHeight: number) => number | undefined); labelListProps?: LabelListProps<ILabelListData>; maxHeight?: number | string; parentHeight?: number; responsiveContainerProps?: ResponsiveContainerProps; setTooltipBarId?: (value: string | undefined) => void; subLabelProps?: LabelListProps<ILabelListData>; subLabelWidth?: number; subLabels?: Array<string>; title?: string; tooltipBarId?: string; tooltipProps?: CustomToolTipProps; UnhoveredTooltipComponent?: React.ReactElement; variant?: VariantType; width?: number | string; xAxisProps?: XAxisProps; yAxisLabelTypographyProps?: TypographyProps; yAxisProps?: YAxisProps; } export declare const measureText: (font: string, text?: string) => number; export declare const DEFAULT_BAR_CATEGORY_GAP = 8; export declare const DEFAULT_BAR_GAP = 4; export declare const BarChart: React.FC<BarChartProps>; export default BarChart; //# sourceMappingURL=index.d.ts.map