import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement.js'; /** * Projection chart recipe — actual-plus-projected time series with an * unambiguous visual boundary between the two phases. * * 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. Actual values * render as a solid line in full saturation from the primary palette color; * projected values render as a dashed line with reduced opacity. A vertical * cutoff rule labeled with `cutoffLabel` marks the boundary. The linked data * table labels each row as "actual" or "projected" so assistive tech makes * the same distinction. * * @use When the story is "here's what happened, here's what we expect" and * the audience must not confuse the two. * @use For year-end forecasts, pace-based projections, and runway lines. * @dontuse When the projection is equally important as the actual — render * two separate `ed-r-line-chart` instances side-by-side instead. * @dontuse For pure historical data — use `ed-r-line-chart`. * @dontuse When there are multiple actual series — this recipe models one * actual + one projection. For multi-series forecasts, build on * `ed-r-line-chart` with `dashed: true` and a legend note. * @a11y `chart-label` is required; announced as the chart region's * accessible name and becomes the caption of the data table. * @a11y The data table's third column labels each row as `actual` or * `projected`, so screen-reader users get the visual distinction * as structured text, not just via dash pattern or opacity. * @a11y The cutoff label rendered on the chart is announced as part of the * data table caption suffix. * @a11y Respects `prefers-reduced-motion`. * @a11y Keyboard navigation across data points is not implemented yet — * tracked on #661 as follow-up work. * * * @anatomy A time-series chart showing an actual series continuing into a projected series, split by an unambiguous visual boundary at `cutoffLabel`. Ships a visually-hidden `dataTable` fallback. * * @related ed-r-line-chart — for a single continuous series with no actual/projected split * @related ed-r-bar-chart — for categorical comparison instead of a trend * @related ed-table — the accessible data-table equivalent of the chart * @related ed-r-stat-card — the projected figure alone * * @content Label the cutoff clearly ("Today", "Forecast"). Keep the chart label a short noun phrase; always supply `dataTable` for screen-reader parity. * * @state Configured by `actual` / `projected` / `cutoffLabel` / `yFormat`. No interaction states. * @slot - Optional extended description rendered between the chart and the * data table. * * @recipe declarative * * @useWhen a forecast should show what has happened so far and what is expected next, with no chance of mistaking one for the other * @useWhen a year-end estimate, a runway or a pace towards a goal needs drawing * * @notWhen everything shown has already happened — use `ed-r-line-chart` * @notWhen several measures need forecasting on the same axes — use `ed-r-line-chart`, marking the forecast part of every series as a forecast * @notWhen the comparison is between categories rather than over time — use `ed-r-bar-chart` * @notWhen only the projected figure matters — use `ed-r-stat-card` * @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 */ export declare class EdRProjection extends EdElement { /** X-axis labels (typically time-series categories). */ labels: string[]; /** Actual (past) values; `null` marks points that don't have data yet. */ actual: (number | null)[]; /** Projected (future) values; `null` marks past points where projection is not applicable. */ projected: (number | null)[]; /** Label for the vertical rule at the actual-to-projected boundary. */ cutoffLabel: string; /** 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; /** Index of the last non-null actual value; -1 if all null. */ private cutoffIndex; private createChart; private toChartJsData; private toChartJsOptions; /** * Custom Chart.js plugin that draws a vertical rule at the cutoff index * and a label in the upper-right of the projected half. */ private cutoffRulePlugin; /** Convert a hex or rgb color to rgba() with the given alpha. */ private withAlpha; render(): import('lit-html').TemplateResult<1>; private renderTable; } declare global { interface HTMLElementTagNameMap { 'ed-r-projection': EdRProjection; } } //# sourceMappingURL=projection.d.ts.map