UNPKG

@groww-tech/react-charts

Version:
29 lines (28 loc) 896 B
import { ReactNode } from 'react'; import './barGraph.css'; declare const BarGraph: { (props: BarGraphProps): JSX.Element | null; defaultProps: DefaultProps; }; export declare type BarData = [string, number, string]; declare type DefaultProps = { axisColor: string; topMargin: number; bottomMargin: number; maxBarWidth: number; getBarTopTextUI: (textX: number, textY: number, barData: BarData) => SVGElement | null; getTooltipUI: (index: number, x: number, y: number, barHeight: number) => ReactNode; showAxis: boolean; hideAxisBottomLine?: boolean; showTooltip?: boolean; axisLabelFontSize?: number; axisLabelColor?: string; bottomAxisHeight: number; }; declare type RequiredProps = { data: BarData[]; width: number; height: number; }; export declare type BarGraphProps = RequiredProps & DefaultProps; export default BarGraph;