import type { FontWeight, ReferenceLine, ReferenceLineBadgeConfig } from "../types"; /** Which of the four reference-line forms a `ReferenceLine` resolves to. */ export type ReferenceLineForm = "line" | "series" | "value-band" | "time-band" | "none"; /** * Classify a `ReferenceLine` into one of its four forms, applying the * documented precedence A (line) > B (series) > C (value band) > D (time band). */ export declare function referenceLineForm(rl: ReferenceLine): ReferenceLineForm; /** * Gather every Y value a set of reference lines should contribute to the * axis-range computation. Lines flagged `excludeFromRange` are skipped, as are * time bands (Form D) which constrain time, not value. */ export declare function collectReferenceValues(lines: ReferenceLine[]): number[]; /** * Stable React keys for an ordered reference-line list. A caller-supplied `id` * keeps the key stable across reordering; the visual config is a deterministic * fallback for legacy lines. Equal fallback signatures receive a suffix so they * remain distinct siblings. */ export declare function referenceLineReactKeys(lines: readonly ReferenceLine[]): string[]; /** * Fully-resolved badge **style/shape** + anchor — the resolved counterpart of * {@link BadgeStyleConfig} (`position` / `icon` / `showText` plus the style knobs). * Shared by the reference-line badge ({@link ResolvedReferenceBadge}) and the * grouping count pill ({@link ResolvedReferenceGroupBadge}). Unset colors stay * `undefined` so the overlay applies the appropriate theme default at render time. */ export interface ResolvedReferenceBadgeStyle { position: "left" | "center" | "right"; /** Leading glyph, or "" for none. */ icon: string; /** Whether the text label is shown (false → icon-only). */ showText: boolean; background: string | undefined; borderColor: string | undefined; /** Border stroke width in px. Default `1`. */ borderWidth: number; radius: number; textColor: string | undefined; /** Per-badge font knobs; undefined → the chart font. */ fontSize: number | undefined; fontFamily: string | undefined; fontWeight: FontWeight | undefined; /** Nudge the whole badge from its anchor, in px. Default `0`. */ offsetX: number; offsetY: number; } /** Fully-resolved presentation for a Form-A reference-line badge — the shared * style/shape plus the in-range / legacy-text flags. */ export interface ResolvedReferenceBadge extends ResolvedReferenceBadgeStyle { /** Show the pill at the value when in range (`badge`) vs only off-screen (legacy `offAxisBadge`). */ inRange: boolean; /** Legacy `"word: value"` text format (off-axis badge) vs the `label`/value format. */ legacyText: boolean; } /** Fully-resolved styling for the grouping **count pill** — exactly the shared * badge style/shape (no in-range / legacy concepts). */ export type ResolvedReferenceGroupBadge = ResolvedReferenceBadgeStyle; /** * Resolves the grouping count-pill styling from a {@link ReferenceLineBadgeConfig} * (the same shape a per-line badge uses). Pure — driven only by the config. */ export declare function resolveReferenceGroupBadge(badge?: ReferenceLineBadgeConfig): ResolvedReferenceGroupBadge; /** * Resolves a Form-A reference line's badge presentation from the new `badge` * config or the legacy `offAxisBadge` flag (the `badge` config wins). Returns * null when neither is set. Pure — driven only by the line props. */ export declare function resolveReferenceBadge(rl: ReferenceLine): ResolvedReferenceBadge | null; /** * Where a Y value sits relative to the visible plot range: * `"in"` (within [min, max]), `"above"` (greater than max), or `"below"`. */ export declare function classifyReferenceEdge(value: number, min: number, max: number): "in" | "above" | "below"; //# sourceMappingURL=referenceLines.d.ts.map