import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement.js'; export interface LineChartDataset { label: string; values: number[]; dashed?: boolean; } export interface LineChartData { labels: string[]; datasets: LineChartDataset[]; } export interface LineChartPaceLine { target: number; completion: number; label?: string; } /** * Line chart recipe — time-series and other continuous-axis data. * * Themed via the tier-2 `--ed-theme-color-*-viz-*` token family (#654), with a * fallback to `--ed-theme-color-background-accent-*` for older versions of * `@brad-frost-web/eddie-design-tokens` that pre-date the viz block. Supports an * optional pace-line (`showPaceLine`) that overlays a dashed target * trajectory, useful for "are we on track?" framing. Accessible baseline: * `role="img"` + `aria-label` on the chart region, plus a linked data table * with one column per dataset and a row per time point. * * @use For temporal data (monthly revenue, weekly active users, cumulative * progress over a quarter). * @use For comparing 2–5 series that share the same x-axis and units. * @use With `showPaceLine` when the story is "did we hit the target?" * @dontuse For discrete categorical comparison — use `ed-r-bar-chart`. * @dontuse When the x-axis has only 2–3 points — the line metaphor reads as * spurious implied continuity. Use `ed-r-bar-chart` instead. * @dontuse For actual-vs-projected overlays — use `ed-r-projection` which * enforces visual separation between the two phases. * @a11y `chart-label` is required; announced as the chart region's accessible * name and becomes the caption of the data table. * @a11y Dashed datasets (`dashed: true`) are announced in the tooltip with * the same label as solid datasets — the visual distinction does not * currently reach the accessibility tree. Use a clear `label` field. * @a11y The pace line, when enabled, appears as an additional row in the * data table so screen-reader users see the same reference values. * @a11y Respects `prefers-reduced-motion`. * @a11y Keyboard navigation across data points is not implemented yet — * tracked on #658 as follow-up work. * * * @anatomy A line chart (Chart.js 4) for continuous-axis / time-series data, with an optional pace line and a visually-hidden `dataTable` fallback. * * @related ed-r-bar-chart — for categorical comparison * @related ed-r-projection — for an actual-vs-projected split * @related ed-table — the accessible data-table equivalent * @related ed-r-stat-card — the latest figure, when the trend is not the story * * @content Lines for trends over a continuous axis. Keep to a few series; always supply `dataTable`. * * @state `showPaceLine` toggles a reference line. Tooltips on hover. * @slot - Optional extended description rendered between the chart and the * data table. * * @recipe declarative * * @useWhen a measure changes over weeks, months or years and the shape of the trend is the story * @useWhen a team wants to follow this year against last, or a few products against one another, through the same months * @useWhen progress should be read against a target pace * * @notWhen the things compared are separate categories rather than moments in time — use `ed-r-bar-chart` * @notWhen there is just a before and an after, or a reading or two more — use `ed-r-bar-chart`, or `ed-r-stat-card` with the change in words * @notWhen what happened must be told apart from what is expected — use `ed-r-projection` * @notWhen reading the exact figures is the main job — use `ed-table`; the chart's own data table is a fallback for assistive technology, not the display * @notWhen only the latest figure matters — use `ed-r-stat-card` */ export declare class EdRLineChart extends EdElement { /** Time-series data — labels and one or more datasets. */ data: LineChartData; /** Optional pace-line overlay for target-tracking charts. */ showPaceLine?: LineChartPaceLine; /** Accessible label for the chart region (required for a11y). */ chartLabel: string; /** Render a toggle-able linked data table (default `true`). */ dataTable: boolean; /** Formatter for numeric values — applied to ticks, tooltip, and data table. */ yFormat: (v: number) => string; private canvas?; private chart?; private theme; private unobserve?; static get styles(): import('lit').CSSResult; disconnectedCallback(): void; firstUpdated(): void; updated(changed: Map): void; private createChart; private paceValues; private toChartJsData; private toChartJsOptions; render(): import('lit-html').TemplateResult<1>; private renderTable; } declare global { interface HTMLElementTagNameMap { 'ed-r-line-chart': EdRLineChart; } } //# sourceMappingURL=line-chart.d.ts.map