UNPKG

@chakra-ui/charts

Version:

Data visualization components for Chakra UI

47 lines (46 loc) 1.94 kB
import type { BoxProps } from "@chakra-ui/react"; import type { LegendProps, TooltipProps } from "recharts"; import type { Payload } from "recharts/types/component/DefaultTooltipContent"; import type { ViewBox } from "recharts/types/util/types"; import { type ChartColor, type UseChartReturn } from "../use-chart"; export interface ChartRootProps<T> extends BoxProps { children: React.ReactElement; chart: UseChartReturn<T>; } export declare function ChartRoot<T>(props: ChartRootProps<T>): import("react/jsx-runtime").JSX.Element; export interface ChartGradientProps { id: string; fillOpacity?: number; stops: { color: ChartColor; offset: string | number; opacity?: number; }[]; } export declare function ChartGradient(props: ChartGradientProps): import("react/jsx-runtime").JSX.Element; export interface ChartLegendProps extends LegendProps { title?: React.ReactNode; nameKey?: string; interaction?: "hover" | "click"; } export declare function ChartLegend(props: ChartLegendProps): import("react/jsx-runtime").JSX.Element | null; export interface ChartTooltipProps extends TooltipProps<string, string> { hideLabel?: boolean; hideIndicator?: boolean; hideSeriesLabel?: boolean; showTotal?: boolean; fitContent?: boolean; nameKey?: string; indicator?: "line" | "dot" | "dashed"; formatter?: (value: any, name: any) => React.ReactNode | [React.ReactNode, React.ReactNode]; render?: (item: Payload<string, string>) => React.ReactNode; } export declare function ChartTooltip(props: ChartTooltipProps): import("react/jsx-runtime").JSX.Element | null; export interface ChartRadialTextProps { viewBox: ViewBox | undefined; title: React.ReactNode; description: React.ReactNode; gap?: number; fontSize?: string; } export declare function ChartRadialText(props: ChartRadialTextProps): import("react/jsx-runtime").JSX.Element | null;