import { type ReactNode } from "react"; import { type ViewProps } from "react-native"; import { 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; /** The hand-off's drawing scale: its 360-unit viewBox width over the frame's (1 without `aspect`). */ scale: number; /** Authored specimen viewport before an SVG meet inset. */ viewportWidth?: number; plotOffsetX?: number; } export interface CartesianFrameProps { /** Raw data extent of the y axis (the frame nices it to the hand-off's quarter grid). */ yExtent: [number, number]; /** Keep `yExtent` as the domain (a caller's own min or max) and only quarter it. */ yExact?: boolean; /** 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); with `aspect`, the most the plot grows to. */ plotHeight: number; /** * Size the frame to the hand-off's 360 by 170 chart (cv-kit-charts.js `W`, `H`), drawn at * the measured width, up to `plotHeight`: its marks then scale by `layout.scale`. */ aspect?: boolean; /** Inset the categorical bands this many hand-off units from each plot edge (the bar Chart's 6). */ bandInset?: number; /** Place the categories as points from the y axis to the plot's right edge (the hand-off's line x) instead of band centres. */ xPoints?: boolean; /** * 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 the hand-off's axis notation: whole below 10,000, then "12.5k"). */ 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; /** Internal specimen hover feedback; independent of the scrub selection. */ plotHoverProps?: (layout: CartesianLayout) => Pick; /** * The inspected category: its guide is drawn through the plot (unless `noGuide`) and its * x label is set in the card ink, shown even where the axis thins its neighbours out. */ selectedBand?: number | null; /** Mark the inspected category without the guide line (a bar's own fill marks it). */ noGuide?: boolean; } export declare function CartesianFrame(props: CartesianFrameProps): import("react").JSX.Element; /** * The chart-root nature shared by the SVG chart types: a chart is FILL. It spans * the parent it is given (a Container step, a Row span, a Card body) and the * geometry measures that width; it never carries a standard width of its own. */ export declare const CHART_ROOT: ViewStyle; //# sourceMappingURL=chart-frame.d.ts.map