/** * Chart Builder - Constructs a ChartModel from simplified AddChartOptions. * * This bridges the high-level API (worksheet.addChart) to the full * OOXML chart model that the XForm layer serialises. */ import type { AddChartOptions, AddChartSeriesOptions, AddComboChartOptions, AddShapeFillOptions, ChartModel, SeriesBase, ShapeProperties, ChartColor } from "./types.js"; /** * Normalise a user-facing hex colour into a structured {@link ChartColor}. * Accepts `"#RRGGBB"` / `"RRGGBB"` and the optional 8-digit * `"RRGGBBAA"` form. The alpha byte, when present, is decoded into * `color.alpha` on the OOXML 0–100000 scale (0 = fully transparent, * 100000 = fully opaque) rather than discarded. Throws * `ChartOptionsError` when the input is not a valid hex triplet so the * caller sees the mistake at the assignment site rather than via a * downstream XML parser rejection. */ export declare function hexToColor(hex: string): ChartColor; /** * Convert a simplified AddShapeFillOptions (or a pre-built ShapeProperties) * into a structured ShapeProperties object. Returns undefined when input is * undefined. */ /** * Normalise a user-facing shape-fill option bundle (hex-string fill, * hex-string border, borderWidth in points, gradient, pattern, …) into a * structured {@link ShapeProperties}. Passes through already-structured * shapes unchanged so callers can mix the two forms freely. * * Exported so `chart-ex-builder` can reuse the exact same normalisation * for ChartEx `spPr` options — previously ChartEx only accepted the * fully-structured form, which was an API asymmetry. */ export declare function toShapeProperties(input: ShapeProperties | AddShapeFillOptions | undefined): ShapeProperties | undefined; export declare function buildChartSeriesForType(chartType: AddChartOptions["type"], options: AddChartSeriesOptions, index: number): SeriesBase; export declare function applyChartSeriesOptionsPatch(series: SeriesBase, options: Partial, chartType?: AddChartOptions["type"]): void; /** * Build a full ChartModel from the simplified AddChartOptions. */ export declare function buildChartModel(opts: AddChartOptions): ChartModel; /** * Build a combo chart model with multiple chart type groups. * * Each group can optionally be plotted on secondary axes. * The builder creates primary axes for the first group that needs * them, and secondary axes for any group with `useSecondaryAxis: true`. */ export declare function buildComboChartModel(opts: AddComboChartOptions): ChartModel;