import type { AnchorSpec } from "./AnchorSpec.js"; import type { ChartExKind } from "./ChartExKind.js"; import type { ChartExQuartileMethod } from "./ChartExQuartileMethod.js"; import type { ChartExSeriesPatch } from "./ChartExSeriesPatch.js"; import type { ChartLegendPosition } from "./ChartLegendPosition.js"; /** * Authoring patch for a modern chartEx chart (`cx:chartSpace` in a separate * `chartEx{N}.xml` part), distilled from ooxmlsdk `ChartSpace`/`Chart`/`Series`. * * Covers the eight `ChartExKind` layouts the xlsx-preview renderer draws. * `categories_ref` is the `cx:strDim type="cat"` formula; for treemap/sunburst * it may be a multi-column range whose columns become hierarchy levels. * Type-specific knobs (`subtotals`, `bin_count`/`bin_size`, `quartile_method`) * apply only to their relevant kind and are ignored otherwise. * * schema-excluded: spPr, txPr, clrMapOvr, fmtOvrs, printSettings, externalData, * plotSurface, dataLabels, valueColors, dataPt, axis styling, extLst */ export type ChartExPatch = { name?: string; kind: ChartExKind; title?: string; anchor: AnchorSpec; /** * `cx:strDim type="cat"` formula (e.g. `Sheet1!$A$2:$A$7`). Optional for * `histogram` (raw observations need no categories). */ categoriesRef?: string; series: Array; legendPosition?: ChartLegendPosition; /** * `cx:subtotals`; 0-based indices of points drawn as totals from zero. * Waterfall only. */ subtotals: Array; /** * `cx:binning/cx:binCount`; number of histogram bins. Histogram only. */ binCount?: number; /** * `cx:binning/cx:binSize`; histogram bin width. Histogram only. Ignored when * `bin_count` is set. */ binSize?: number; /** * `cx:statistics/@quartileMethod`. Box-and-whisker only. */ quartileMethod?: ChartExQuartileMethod; };