import React from 'react'; import { BaseChartProps } from './types'; export interface SpacingProps { m?: number; mt?: number; mr?: number; mb?: number; ml?: number; mx?: number; my?: number; p?: number; pt?: number; pr?: number; pb?: number; pl?: number; px?: number; py?: number; } export declare const ChartContainer: React.FC; export declare const CHART_TITLE_FONT_SIZE = 18; export declare const CHART_SUBTITLE_FONT_SIZE = 14; export declare const CHART_LEGEND_PADDING = 10; /** Average glyph advance for the chart sans stack — close enough to reserve space by. */ export declare const estimateChartTextWidth: (text: string, fontSize: number) => number; /** Height ChartTitle occupies, including a gap before whatever is drawn below it. */ export declare const measureChartTitleBand: (title?: string, subtitle?: string, options?: { titleSize?: number; subtitleSize?: number; gap?: number; }) => number; export interface ChartLegendBand { top: number; right: number; bottom: number; left: number; } /** * Space ChartLegend occupies on the edge it is pinned to. Horizontal legends are packed * into rows against the container width, so a legend that wraps reserves every row it needs * rather than only the first. */ export declare const measureChartLegendBand: (options: { items: Array<{ label: string; }> | undefined; containerWidth: number; position?: "top" | "right" | "bottom" | "left"; fontSize?: number; }) => ChartLegendBand; export interface ChartPadding { top: number; right: number; bottom: number; left: number; } /** * Grows a chart's axis padding so the plot clears the ChartTitle and ChartLegend overlays. * * The title shares the top padding region — nothing else is drawn up there — so the two take * whichever is larger. A legend stacks beyond the axis labels rather than overlapping them, * so its band is added on. Pass `legendItems` only when the legend is actually rendered; * charts disagree on whether `legend.show` defaults to true, and that stays their business. * * Charts with neither a title nor a legend keep their padding untouched. */ export declare const withChartBandPadding: (basePadding: ChartPadding, options: { title?: string; subtitle?: string; legendItems?: Array<{ label: string; }>; legendPosition?: "top" | "right" | "bottom" | "left"; legendFontSize?: number; containerWidth: number; /** * Space above the plot that is *not* the title — an axis title or a top tick label that * shares the band. Stacks below the title instead of competing with it. */ topAllowance?: number; }) => ChartPadding; export declare const ChartTitle: React.FC<{ title?: string; subtitle?: string; titleColor?: string; subtitleColor?: string; titleSize?: number; subtitleSize?: number; align?: 'left' | 'center' | 'right'; style?: any; }>; export declare const ChartLegend: React.FC<{ items: Array<{ label: string; color: string; visible?: boolean; }>; position?: 'top' | 'bottom' | 'left' | 'right'; align?: 'start' | 'center' | 'end'; textColor?: string; fontSize?: number; /** onItemPress now receives (item, index, nativeEvent?) where nativeEvent may hold modifier keys (altKey, metaKey, shiftKey, ctrlKey) on web */ onItemPress?: (item: any, index: number, nativeEvent?: any) => void; style?: any; }>;