export type LineChartTone = "category1" | "category2" | "category3" | "category4" | "category5" | "category6" | "category7" | "category8"; export type LineChartDatum = { x: number | string; y: number; /** * Marks the datum as a FORECAST point. Forecast points render with the * dedicated forecast tone and every segment touching a forecast point is * dashed — including the segment between the last actual point and the * first forecast point, so the line stays connected. Absent/false ⇒ * rendering unchanged (additive). */ forecast?: boolean; }; /** * Semantic tone for an analytical overlay (reference line / band / goal). * Maps to the feedback token family — markers, not categorical series. */ export type ChartOverlayTone = "neutral" | "success" | "warning" | "error" | "info"; export type ChartReferenceLine = { value: number; label?: string; tone?: ChartOverlayTone; axis?: "x" | "y"; }; export type ChartBand = { from: number; to: number; label?: string; tone?: ChartOverlayTone; }; export type ChartGoalLine = { value: number; label?: string; }; /** Value-axis scale type. `log` requires strictly positive values. */ export type ChartScale = "linear" | "log"; import { type ChartAnnotation } from "./chartAnnotations.js"; import { type DataLabelsProp } from "./chartDataLabels.js"; type LineChartProps = { data: LineChartDatum[]; width?: number; height?: number; tone?: LineChartTone; smooth?: boolean; area?: boolean; label: string; /** Reference lines (default `axis: "y"` → horizontal at `value`). */ referenceLines?: ChartReferenceLine[]; /** Shaded value-axis bands between `from`..`to`. */ bands?: ChartBand[]; /** A single goal line, emphasised above the data. */ goalLine?: ChartGoalLine; /** Least-squares trend line over the data points. */ trend?: boolean; /** * Annotation overlay in DATA space (points, labels, axis lines, regions, * polygons). Resolved to pixels via the chart's scales and drawn in a * dedicated `` — regions behind the * series, every other kind above it. Additive: absent ⇒ unchanged. */ annotations?: ChartAnnotation[]; /** * Per-point value labels. `false`/absent (default) → none. `true` → each * point's value with the chart's numeric formatter. Object → `format(value)` * and/or a `position` override. Default position is `top` (above the point). * Labels are `aria-hidden` — the values already live in the accessible * ChartDataList. */ dataLabels?: DataLabelsProp; /** * Fixed value-axis (y) domain `[min, max]`. When provided (and finite, * min void; /** * FR-5 — keyboard navigation of the data points (roving tabindex). When `true` * (or implied by wiring `onSelectKey`), a thin focusable overlay is rendered * over the points: the chart owns ONE tab stop, ←/↑/→/↓ move the focus between * points (data order), Home/End jump to the first/last, Enter/Space select the * focused point (`onSelectKey`), Escape leaves the navigation. Each focused * point announces its `x` + value. Absent ⇒ no overlay, rendering unchanged. */ keyboardNav?: boolean; /** * Emitted when the user selects the focused point via Enter/Space (its key, * `String(x)`), or `null` when the navigation is left via Escape. Wiring it * also turns the keyboard navigation on. */ onSelectKey?: (key: string | null) => void; class?: string; }; declare const LineChart: import("svelte").Component; type LineChart = ReturnType; export default LineChart; //# sourceMappingURL=LineChart.svelte.d.ts.map