import * as react_jsx_runtime from 'react/jsx-runtime'; import * as react from 'react'; import { Dispatch, SetStateAction, FC, ReactElement, PropsWithChildren } from 'react'; import { ScaleTypeToD3Scale } from '@visx/scale'; import { TooltipWithBounds } from '@visx/tooltip'; import { UseTooltipParams } from '@visx/tooltip/lib/hooks/useTooltip'; import { TooltipInPortalProps } from '@visx/tooltip/lib/hooks/useTooltipInPortal'; declare function Areas({ seriesStyles, showLatestValueCircle, }: { seriesStyles?: { id: string; gradientClassName?: string; lineClassName?: string; areaFill?: string; lineStroke?: string; }[]; showLatestValueCircle?: boolean; }): react_jsx_runtime.JSX.Element; declare function Bars({ seriesStyles, radius, }: { seriesStyles?: { id: string; barClassName?: string; barFill?: string; }[]; radius?: number; }): react_jsx_runtime.JSX.Element; type Datum = Record; type TimeSeriesDatum = { date: Date; values: T; }; type AccessorFn = (datum: TimeSeriesDatum) => TValue; type Series = { id: string; isActive?: boolean; valueAccessor: AccessorFn; colorClassName?: string; }; type Data = TimeSeriesDatum[]; type ChartRequiredProps = { data: Data; series: Series[]; }; type ChartOptionalProps = { type?: "area" | "bar"; tooltipContent?: (datum: TimeSeriesDatum) => ReactElement | string; tooltipClassName?: string; defaultTooltipIndex?: number | null; /** * Called when the hovered x-value (date) changes, or when hover is cleared. * Useful for syncing external UI to the currently hovered datum. */ onHoverDateChange?: (date: Date | null) => void; /** * Absolute pixel values for margins around the chart area. * Default values accommodate axis labels and other expected overflow. */ margin?: { top: number; right: number; bottom: number; left: number; }; /** * Decimal percentages for padding above and below highest and lowest y-values */ padding?: { top: number; bottom: number; }; }; type ChartProps = ChartRequiredProps & ChartOptionalProps; type ChartContext$1 = Required, "onHoverDateChange">> & { width: number; height: number; startDate: Date; endDate: Date; xScale: ScaleTypeToD3Scale["utc"] | ScaleTypeToD3Scale["band"]; yScale: ScaleTypeToD3Scale["linear"]; minY: number; maxY: number; leftAxisMargin?: number; setLeftAxisMargin: Dispatch>; /** * Optional callback invoked when the hovered x-value (date) changes. */ onHoverDateChange?: (date: Date | null) => void; }; type ChartTooltipContext$1 = { handleTooltip: (event: React.TouchEvent | React.MouseEvent) => void; TooltipWrapper: FC | typeof TooltipWithBounds; containerRef: (element: SVGElement | HTMLElement | null) => void; } & UseTooltipParams>; declare const ChartContext: react.Context; declare function useChartContext(): ChartContext$1; declare const ChartTooltipContext: react.Context; declare function useChartTooltipContext(): ChartTooltipContext$1; type FunnelChartProps = { steps: { id: string; label: string; value: number; additionalValue?: number; colorClassName: string; }[]; persistentPercentages?: boolean; tooltips?: boolean; defaultTooltipStepId?: string; chartPadding?: number; }; declare function FunnelChart(props: FunnelChartProps): react_jsx_runtime.JSX.Element; type TimeSeriesChartProps = PropsWithChildren>; declare function TimeSeriesChart(props: TimeSeriesChartProps): react_jsx_runtime.JSX.Element; type ChartTooltipSyncContextType = { tooltipDate?: Date | null; setTooltipDate?: Dispatch>; }; declare const ChartTooltipSyncContext: react.Context; declare function ChartTooltipSync({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element; type XAxisProps = { /** * Maximum number of ticks to generate */ maxTicks?: number; /** * Whether to render dashed grid lines across the chart area */ showGridLines?: boolean; /** * Whether to render a line for the axis */ showAxisLine?: boolean; /** * Whether to highlight the latest tick label when no other area is hovered */ highlightLast?: boolean; /** * Custom formatting function for tick labels */ tickFormat?: (date: Date) => string; }; declare function XAxis({ maxTicks: maxTicksProp, showGridLines, highlightLast, showAxisLine, tickFormat, }: XAxisProps): react_jsx_runtime.JSX.Element; type YAxisProps = { /** * Approximate number of ticks to generate (see d3-array's `ticks`) */ numTicks?: number; /** * Whether to render dashed grid lines across the chart area */ showGridLines?: boolean; /** * Whether to only generate integer ticks (no decimals) */ integerTicks?: boolean; /** * Tick values to override dynamic tick generation */ tickValues?: number[]; /** * Custom formatting function for tick labels */ tickFormat?: (value: number) => string; /** * Amount of space between tick labels and the axis line / chart area */ tickAxisSpacing?: number; }; declare function YAxis({ numTicks: numTicksProp, showGridLines, integerTicks, tickValues: tickValuesProp, tickFormat, tickAxisSpacing, }: YAxisProps): react_jsx_runtime.JSX.Element; export { Areas, Bars, ChartContext, ChartTooltipContext, ChartTooltipSync, ChartTooltipSyncContext, FunnelChart, TimeSeriesChart, XAxis, XAxisProps, YAxis, YAxisProps, useChartContext, useChartTooltipContext };