@chakra-ui/charts
Version:
Data visualization components for Chakra UI
43 lines (42 loc) • 1.97 kB
TypeScript
import type { BoxProps, StackProps, Tokens } from "@chakra-ui/react";
import * as React from "react";
import type { UseChartReturn } from "../use-chart";
export interface BarSegmentData {
name: string;
value: number;
color: string;
}
interface ChartProps {
chart: UseChartReturn<BarSegmentData>;
}
export interface BarSegmentRootProps extends StackProps, ChartProps {
barSize?: Tokens["sizes"];
}
export declare function BarSegmentRoot(props: BarSegmentRootProps): import("react/jsx-runtime").JSX.Element;
export declare const BarSegmentContent: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
export interface BarSegmentLabelProps extends StackProps {
}
export declare function BarSegmentLabel(props: BarSegmentLabelProps): import("react/jsx-runtime").JSX.Element;
export interface BarSegmentBarProps extends StackProps {
tooltip?: boolean | ((props: BarSegmentTooltipProps) => React.ReactNode);
}
export declare function BarSegmentBar(props: BarSegmentBarProps): import("react/jsx-runtime").JSX.Element;
export interface BarSegmentReferenceProps extends BoxProps {
value: number;
label?: React.ReactNode;
}
export declare function BarSegmentReference(props: BarSegmentReferenceProps): import("react/jsx-runtime").JSX.Element;
export interface BarSegmentValueProps extends StackProps {
}
export declare function BarSegmentValue(props: BarSegmentValueProps): import("react/jsx-runtime").JSX.Element;
export interface BarSegmentLegendProps extends StackProps {
showPercent?: boolean;
showValue?: boolean;
valueFormatter?: (value: number) => string;
}
export declare function BarSegmentLegend(props: BarSegmentLegendProps): import("react/jsx-runtime").JSX.Element;
export interface BarSegmentTooltipProps extends StackProps {
payload: BarSegmentData;
}
export declare function BarSegmentTooltip(props: BarSegmentTooltipProps): import("react/jsx-runtime").JSX.Element | null;
export {};