/** * Calculated-field chart series: evaluate a spreadsheet formula per category over the **aggregated** * measure values (aggregate-then-evaluate — the ratio-of-totals a user expects; see * plans/chart-calculated-fields-spec.md). Pure: it drives the (DOM-free) formula engine, so it is * unit-tested directly. References are A1, where the letters map to the numeric columns in display * order (`A1` = first numeric column, row is always 1 — one aggregated value per column per category). */ import type { CalculatedField } from './chart.js'; /** Whether `formula` parses (parse-only; does not evaluate). Drives the editor's live validation. */ export declare function isValidChartFormula(formula: string): boolean; /** * Compute each {@link CalculatedField} as a series. `refAggregates[letterColIndex][categorySlot]` is * the aggregated value of the numeric column mapped to that letter (A = index 0) for that category. * Evaluated once per category (aggregate-then-evaluate). An unparseable formula is skipped entirely; * an error or non-finite result for a category becomes `null` (a gap) rather than a misleading zero. */ export declare function computeCalculatedSeries(fields: readonly CalculatedField[], refAggregates: readonly number[][], categoryCount: number): { name: string; data: (number | null)[]; }[];