UNPKG

@chakra-ui/charts

Version:

Data visualization components for Chakra UI

48 lines (47 loc) 2.02 kB
import type { BoxProps } from "@chakra-ui/react"; import type { LegendPayload, LegendProps, TooltipContentProps } 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"; payload?: LegendPayload[]; } export declare function ChartLegend(props: ChartLegendProps): import("react/jsx-runtime").JSX.Element | null; export interface ChartTooltipProps extends Partial<TooltipContentProps<string | number, 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;