import { type ReactNode } from "react"; import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { type Band } from "./chart-math.js"; export interface CartesianLayout { /** Plot-area size in px (excludes the y gutter and x-label band). */ plotW: number; plotH: number; /** Value -> y px (0 is the plot top). */ y: (v: number) => number; /** Numeric x -> x px (identity of the x domain passed in `xDomain`). */ x: (v: number) => number; /** Categorical band info when `xLabels` drives the x axis. */ band: Band | null; /** The niced y domain and its ticks. */ yTicks: number[]; yMin: number; yMax: number; } export interface CartesianFrameProps { /** Raw data extent of the y axis (the frame nices it). */ yExtent: [number, number]; /** Categorical x axis: one label per band. Mutually exclusive with xDomain. */ xLabels?: string[]; /** Numeric x axis extent (scatter). Mutually exclusive with xLabels. */ xDomain?: [number, number]; /** Plot-area height in px (chart component picks it by density). */ plotHeight: number; /** * Reserve this many px at the bottom of the plot for a docked companion * pane (e.g. candlestick volume): the y scale and its gridlines compress to * the region above it, while the plot, baseline, x labels, and scrub keep * the full height. */ plotInsetBottom?: number; compact?: boolean; hideGrid?: boolean; hideAxes?: boolean; /** Tick/label formatter (defaults to compact "1.2k" notation). */ formatValue?: (v: number) => string; /** The SVG mark layer, given the computed coordinate system. */ children: (layout: CartesianLayout) => ReactNode; /** Optional RN layer absolutely positioned over the plot (tooltips, flags). */ overlay?: (layout: CartesianLayout) => ReactNode; /** * Scrub-to-inspect: SET the selection to the band under the press/drag * (null clears, from a stationary tap on the selected band). The hit layer * is a responder-based ScrubSurface over the plot - never an SVG touchable, * whose web path leaks RN responder props onto DOM nodes. */ onBandScrub?: (index: number | null) => void; /** Draw the selection guide through this category band. */ selectedBand?: number | null; } export declare function CartesianFrame(props: CartesianFrameProps): import("react").JSX.Element; /** * The chart-root width guard shared by the SVG chart types: render AT the * standard chart width (capped by the container) unless the caller sized the * chart via `width`/`flex`, mirroring the field-width lesson - a bare * width:100% collapses to nothing in centered/content-sized parents. */ export declare function chartRootWidth(style: StyleProp, standard: number): ViewStyle; //# sourceMappingURL=chart-frame.d.ts.map