/** * ChartEx builder — constructs a ChartExModel from simplified AddChartExOptions. * * Each layoutId corresponds to a distinct chart type. The builder produces a * structured model that the renderer serialises to `cx:chart` XML. */ import type { AddChartExOptions, ChartExModel } from "./chart-ex-types.js"; /** * Combine multiple single-column range formulas (first item is the * OUTERMOST hierarchy level, last item is the leaf level / primary * category) into a single multi-column range that Excel's hierarchical * chartEx loader accepts. * * Microsoft Excel's treemap / sunburst writer emits ONE `` * whose `` points at a contiguous multi-column range spanning * every hierarchy level (e.g. `Sheet1!$A$2:$C$8` for a Region / Country * / City breakdown). The chart reader derives the hierarchy from the * column ORDER within that range — the first column is the root and * the last is the leaf. Emitting per-level `` siblings (one * per formula) is schema-legal but makes Excel draw an empty plot * area: verified against `reference-hierarchy.xlsx` (Excel-authored * sample) where the same hierarchy renders correctly only when the * columns live under a single ``. * * Returns the combined formula when every input formula lives on the * same sheet with identical row spans and contiguous ascending columns * (the common case when authors lay their hierarchy out in adjacent * worksheet columns). Returns `null` otherwise — the caller should * fall back to per-level caching because Excel has no way to express * a non-contiguous hierarchy as a single range. */ export declare function combineHierarchyFormulas(formulas: readonly string[]): string | null; /** * Build a structured ChartExModel from high-level options. */ export declare function buildChartExModel(opts: AddChartExOptions): ChartExModel;