import { Color, DmlAngle, Percentage, Shape, TextAnchoring, TextBody, TextVerticalType, Workbook, integer } from "@jsfkit/types"; //#region src/utils/mdw.d.ts /** * Maximum Digit Width (MDW) for a workbook's Normal font. * * Excel records every column width in character units of the workbook Normal font's MDW — the pixel * advance of its widest digit, rounded. Converting those widths to pixels therefore needs the Normal * font's true MDW, not a fixed constant. `MDW = round(digitAdvance / unitsPerEm * pointSize)`, with * `pointSize` used directly as the em size (no 96/72 DPI factor) — the coordinate convention in which * Aptos Narrow 12 yields MDW 6. * * Metrics below are the digit advance / unitsPerEm read from the font files Excel for Mac renders * with — its bundled DFonts, except Georgia, which is not Office-bundled and comes from the macOS * system copy. Regenerate with `scripts/extract-digit-metrics.py`. Unknown fonts fall back to * {@link DEFAULT_MDW}; supply a resolver to cover arbitrary fonts. */ /** Resolve an MDW for an arbitrary font. Returning null/undefined defers to the built-in table. */ type MdwResolver = (fontFamily: string, fontSizePt: number) => number | null | undefined; //#endregion //#region src/errors.d.ts declare class InvalidFileError extends Error {} declare class EncryptionError extends Error {} declare class MissingSheetError extends Error {} declare class UnsupportedError extends Error {} //#endregion //#region src/convertCSV.d.ts /** CSV convertion options */ type CSVConversionOptions = { /** * The delimiter to use to parse the CSV. Normally this is auto-detected. * @defaultValue null */ delimiter?: null | ',' | ';' | '\t'; /** * The character used to escape quotation marks in strings. * @defaultValue '"' */ escapeChar?: null | '\\' | '"'; /** * Skip empty lines instead of creating empty rows. * @defaultValue true */ skipEmptyLines?: boolean; /** * The name of the sheet to create in the resulting workbook. * @defaultValue 'Sheet1' */ sheetName?: string; /** * The locale (as a BCP 47 string) to use when parsing dates and numbers. * @see {https://developer.mozilla.org/en-US/docs/Glossary/BCP_47_language_tag} * @defaultValue 'en-US' */ locale?: string; /** * Create a table descriptor object for the data in the sheet. * @defaultValue false */ table?: boolean; }; /** * Convert a CSV/TSV into JSF format. * * The returned JSF structure contains all the data table found in the file presented as * a spreadsheet table. * * @param csvStream A string of CSV data * @param name Name of the file being converted, to be used as the workbook name * @param [options] Conversion options * @return A JSON spreadsheet formatted object. */ declare function convertCSV(csvStream: string, name: string, options?: CSVConversionOptions): Workbook; //#endregion //#region src/handler/charts/types/TextProps.d.ts type TextProps = { /** * Vertical anchoring/alignment of text within the shape. * @default "t" */ anchor?: TextAnchoring; /** * Whether text is centered at the anchor point. * @default false */ anchorCtr?: boolean; /** * Text rotation in 60,000ths of a degree (e.g., 5400000 = 90 degrees). * @default 0 */ rot?: DmlAngle; /** * Keep text upright regardless of shape rotation. * @default false */ upright?: boolean; /** * Text orientation is vertical (top-to-bottom). * @default "horz" */ vert?: TextVerticalType; /** * Text colour. */ color?: Color; typeface?: string; size?: number; bold?: boolean; italic?: boolean; caps?: 'all' | 'none'; }; //#endregion //#region src/handler/charts/types/plots/PictureOptions.d.ts type PictureFormat = 'stretch' | 'stack' | 'stackScale'; type PictureOptions = { applyToFront?: boolean; applyToSides?: boolean; applyToEnd?: boolean; pictureFormat?: PictureFormat; pictureStackUnit?: number; }; //#endregion //#region src/handler/charts/types/3d/Surface.d.ts type Surface = { /** * @min 0 */ thickness?: integer; shape?: Shape; pictureOptions?: PictureOptions; }; //#endregion //#region src/handler/charts/types/3d/View3d.d.ts type View3d = { /** * @min -90 * @max 90 * @default 0 */ rotX?: integer; /** * @min 5 * @max 500 * @default 100 */ hPercent?: Percentage; /** * @min 0 * @max 360 * @default 0 */ rotY?: number; /** * @min 20 * @max 2000 * @default "100%" */ depthPercent?: Percentage; rAngAx?: boolean; /** * @min 0 * @max 240 * @default 30 */ perspective?: integer; }; //#endregion //#region src/handler/charts/types/DispBlanksAs.d.ts type DispBlanksAs = 'span' | 'gap' | 'zero'; //#endregion //#region src/handler/charts/types/ManualLayout.d.ts type ManualLayout = { layoutTarget?: 'inner' | 'outer'; xMode?: 'edge' | 'factor'; yMode?: 'edge' | 'factor'; wMode?: 'edge' | 'factor'; hMode?: 'edge' | 'factor'; x?: number; y?: number; w?: number; h?: number; }; //#endregion //#region src/handler/charts/types/legend/LegendEntry.d.ts type LegendEntry = { /** * The index of the legend entry this applies to. */ idx: integer; /** * Has is the legend entry to be omitted from the chart? */ delete?: boolean; /** * Font style properties for the legend entry. */ textProps?: TextProps; }; //#endregion //#region src/handler/charts/types/legend/LegendPos.d.ts /** * The position of the legend on the chart. */ type LegendPos = 'b' | 'tr' | 'l' | 'r' | 't'; //#endregion //#region src/handler/charts/types/legend/Legend.d.ts type Legend = { /** * Ex charts will not include a 'tr' position * @default "r" */ pos?: LegendPos; /** * Formatting for */ legendEntry?: LegendEntry[]; layout?: ManualLayout; /** * A true means that the legend may overlap the chart * @default false */ overlay?: boolean; shape?: Shape; textProps?: TextProps; }; //#endregion //#region src/handler/charts/types/marker/MarkerStyle.d.ts type MarkerStyle = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'picture' | 'plus' | 'square' | 'star' | 'triangle' | 'x' | 'auto'; //#endregion //#region src/handler/charts/types/marker/Marker.d.ts /** * */ type Marker = { symbol?: MarkerStyle; /** * @min 2 * @max 72 * @defaultValue 5 */ size?: integer; shape?: Shape; }; //#endregion //#region src/handler/charts/types/datalabels/DLblPos.d.ts type DLblPos = 'b' | 'bestFit' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't'; //#endregion //#region src/handler/charts/types/NumFmt.d.ts /** * Specifies a number formatting. */ type NumFmt = { /** * This element specifies a string representing the format code to apply. */ formatCode: string; /** * Linked to Source. * @default 1 */ sourceLinked?: boolean; }; //#endregion //#region src/handler/charts/types/datalabels/DLblShared.d.ts /** * */ type DLblShared = { numFmt?: NumFmt; shape?: Shape; textProps?: TextProps; dLblPos?: DLblPos; showLegendKey?: boolean; showVal?: boolean; showCatName?: boolean; showSerName?: boolean; showPercent?: boolean; showBubbleSize?: boolean; separator?: string; }; //#endregion //#region src/handler/charts/types/data/StrVal.d.ts /** * */ type StrVal = { idx: integer; v: string; }; //#endregion //#region src/handler/charts/types/data/StrData.d.ts type StrData = { type: 'strData'; ptCount?: integer; pt?: StrVal[]; }; //#endregion //#region src/handler/charts/types/data/StrRef.d.ts /** * */ type StrRef = { type: 'strRef'; f: string; strCache?: StrData; }; //#endregion //#region src/handler/charts/types/Text.d.ts type Text = StrRef | TextBody; //#endregion //#region src/handler/charts/types/datalabels/DLbl.d.ts /** * */ type DLbl = { idx: integer; /** when `delete` is set, ignore all other props except idx */ delete?: boolean; layout?: ManualLayout; text?: Text; } & DLblShared; //#endregion //#region src/handler/charts/types/PivotFmt.d.ts type PivotFmt = { idx: integer; shape?: Shape; textProps?: TextProps; marker?: Marker; dLbl?: DLbl; }; //#endregion //#region src/handler/charts/types/PivotFmts.d.ts type PivotFmts = { pivotFmt?: PivotFmt[]; }; //#endregion //#region src/handler/charts/types/axes/LblAlgn.d.ts type LblAlgn = 'ctr' | 'l' | 'r'; //#endregion //#region src/handler/charts/types/axes/AxPos.d.ts type AxPos = 'b' | 'l' | 'r' | 't'; //#endregion //#region src/handler/charts/types/axes/Orientation.d.ts type Orientation = 'maxMin' | 'minMax'; //#endregion //#region src/handler/charts/types/axes/Scaling.d.ts type Scaling = { /** * @min 2 * @max 1000 */ logBase?: number; /** * @default "minMax" */ orientation?: Orientation; max?: number; min?: number; }; //#endregion //#region src/handler/charts/types/Title.d.ts type Title = { text?: Text; textProps?: TextProps; layout?: ManualLayout; /** * A true means that the title may overlap the chart * @default false */ overlay?: boolean; shape?: Shape; }; //#endregion //#region src/handler/charts/types/axes/TickMark.d.ts type TickMark = 'cross' | 'in' | 'none' | 'out'; //#endregion //#region src/handler/charts/types/axes/TickLblPos.d.ts type TickLblPos = 'high' | 'low' | 'nextTo' | 'none'; //#endregion //#region src/handler/charts/types/axes/Crosses.d.ts type Crosses = 'autoZero' | 'max' | 'min'; //#endregion //#region src/handler/charts/types/axes/AxShared.d.ts type AxShared = { axId: integer; scaling?: Scaling; delete?: boolean; axPos: AxPos; majorGridlines?: Shape; minorGridlines?: Shape; title?: Title; numFmt?: NumFmt; majorTickMark?: TickMark; minorTickMark?: TickMark; tickLblPos?: TickLblPos; shape?: Shape; textProps?: TextProps; crossAx: integer; crosses: Crosses | number; }; //#endregion //#region src/handler/charts/types/axes/CatAx.d.ts type CatAx = AxShared & { type: 'catAx'; auto?: boolean; lblAlgn?: LblAlgn; /** * @min 0 * @max 1000 * @default 100 */ lblOffset?: Percentage; /** * @min 1 */ tickLblSkip?: integer; /** * @min 1 */ tickMarkSkip?: integer; noMultiLvlLbl?: boolean; }; //#endregion //#region src/handler/charts/types/axes/TimeUnit.d.ts type TimeUnit = 'days' | 'months' | 'years'; //#endregion //#region src/handler/charts/types/axes/DateAx.d.ts type DateAx = AxShared & { type: 'dateAx'; auto?: boolean; /** * @min 0 * @max 100 */ lblOffset?: Percentage; /** * @default "days" */ baseTimeUnit?: TimeUnit; majorUnit?: number; /** * @default "days" */ majorTimeUnit?: TimeUnit; minorUnit?: number; /** * @default "days" */ minorTimeUnit?: TimeUnit; }; //#endregion //#region src/handler/charts/types/axes/SerAx.d.ts type SerAx = AxShared & { type: 'serAx'; /** * @min 1 */ tickLblSkip?: integer; /** * @min 1 */ tickMarkSkip?: integer; }; //#endregion //#region src/handler/charts/types/axes/CrossBetween.d.ts type CrossBetween = 'between' | 'midCat'; //#endregion //#region src/handler/charts/types/axes/BuiltInUnit.d.ts type BuiltInUnit = 'hundreds' | 'thousands' | 'tenThousands' | 'hundredThousands' | 'millions' | 'tenMillions' | 'hundredMillions' | 'billions' | 'trillions'; //#endregion //#region src/handler/charts/types/axes/DispUnitsLbl.d.ts type DispUnitsLbl = { layout?: ManualLayout; text?: Text; shape?: Shape; textProps?: TextProps; }; //#endregion //#region src/handler/charts/types/axes/DispUnits.d.ts type DispUnits = { dispUnitsLbl?: DispUnitsLbl; custUnit: number; } | { dispUnitsLbl?: DispUnitsLbl; /** * @default "thousands" */ builtInUnit: BuiltInUnit; }; //#endregion //#region src/handler/charts/types/axes/ValAx.d.ts type ValAx = AxShared & { type: 'valAx'; crossBetween?: CrossBetween; majorUnit?: number; minorUnit?: number; dispUnits?: DispUnits; }; //#endregion //#region src/handler/charts/types/axes/Axis.d.ts type Axis = ValAx | CatAx | DateAx | SerAx; //#endregion //#region src/handler/charts/types/plots/ChartLines.d.ts type ChartLines = { shape: Shape; }; //#endregion //#region src/handler/charts/types/plots/Grouping.d.ts type Grouping = 'percentStacked' | 'standard' | 'stacked'; //#endregion //#region src/handler/charts/types/datalabels/DLbls.d.ts /** * */ type DLbls = { dLbl?: DLbl[]; /** when `delete` is set, ignore all other props except dLbl */ delete?: boolean; showLeaderLines?: boolean; leaderLines?: ChartLines; } & DLblShared; //#endregion //#region src/handler/charts/types/datalabels/DPt.d.ts /** * */ type DPt = { idx: integer; invertIfNegative?: boolean; marker?: Marker; bubble3D?: boolean; explosion?: integer; shape?: Shape; pictureOptions?: PictureOptions; }; //#endregion //#region src/handler/charts/types/data/Lvl.d.ts /** * */ type Lvl = { pt?: StrVal[]; }; //#endregion //#region src/handler/charts/types/data/MultiLvlStrData.d.ts /** * */ type MultiLvlStrData = { ptCount?: integer; lvl?: Lvl[]; }; //#endregion //#region src/handler/charts/types/data/MultiLvlStrRef.d.ts type MultiLvlStrRef = { type: 'mlStrRef'; f: string; multiLvlStrCache?: MultiLvlStrData; }; //#endregion //#region src/handler/charts/types/data/NumVal.d.ts /** * */ type NumVal = { idx: integer; v: string; formatCode?: string; }; //#endregion //#region src/handler/charts/types/data/NumData.d.ts /** * */ type NumData = { type: 'numData'; formatCode?: string; ptCount?: integer; pt?: NumVal[]; }; //#endregion //#region src/handler/charts/types/data/NumRef.d.ts /** * */ type NumRef = { type: 'numRef'; f: string; numCache?: NumData; }; //#endregion //#region src/handler/charts/types/data/AxDataSource.d.ts type AxDataSource = MultiLvlStrRef | NumRef | NumData | StrRef | StrData; //#endregion //#region src/handler/charts/types/data/NumDataSource.d.ts type NumDataSource = NumRef | NumData; //#endregion //#region src/handler/charts/types/trendline/TrendlineType.d.ts type TrendlineType = 'exp' | 'linear' | 'log' | 'movingAvg' | 'poly' | 'power'; //#endregion //#region src/handler/charts/types/trendline/TrendlineLbl.d.ts /** * */ type TrendlineLbl = { layout?: ManualLayout; numFmt?: NumFmt; shape?: Shape; text?: Text; textProps?: TextProps; }; //#endregion //#region src/handler/charts/types/trendline/Trendline.d.ts /** * */ type Trendline = { name?: string; shape?: Shape; type: TrendlineType; /** * @min 2 * @max 6 * @default 2 */ order?: integer; /** * @min 2 * @default 2 */ period?: integer; forward?: number; backward?: number; intercept?: number; dispRSqr?: boolean; dispEq?: boolean; label?: TrendlineLbl; }; //#endregion //#region src/handler/charts/types/errorbars/ErrBarType.d.ts type ErrBarType = 'both' | 'minus' | 'plus'; //#endregion //#region src/handler/charts/types/errorbars/ErrDir.d.ts type ErrDir = 'x' | 'y'; //#endregion //#region src/handler/charts/types/errorbars/ErrValType.d.ts type ErrValType = 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr'; //#endregion //#region src/handler/charts/types/errorbars/ErrBars.d.ts /** * */ type ErrBars = { errDir?: ErrDir; errBarType: ErrBarType; errValType: ErrValType; noEndCap?: boolean; plus?: NumDataSource; minus?: NumDataSource; val?: number; shape?: Shape; }; //#endregion //#region src/handler/charts/types/plots/BarShape.d.ts type BarShape = 'cone' | 'coneToMax' | 'box' | 'cylinder' | 'pyramid' | 'pyramidToMax'; //#endregion //#region src/handler/charts/types/series/Series.d.ts type Series = { /** * Reference index of the series. */ idx: integer; /** * The order number for the series. */ order: integer; /** * Text label for the series. */ text?: StrRef | string; /** * Visual properties specific to this series. */ shape?: Shape; /** * Data points * * Used by: All except *Surface* */ dPt?: DPt[]; /** * Data labels * * Used by: All except *Surface* */ dLbls?: DLbls; /** * Used by: *Bar, Area* */ pictureOptions?: PictureOptions; /** * Shape of the bar mark * * Used by: *Bar* */ barShape?: BarShape; /** * Trendline * * Used by: *Area, Bar, Bubble, Line, Scatter* */ trendline?: Trendline[]; /** * Error bars * * Used by: *Area, Bar, Bubble, Line, Scatter* */ errBars?: ErrBars; /** * Marker style properties * * Used by: *Line, Radar, Scatter* */ marker?: Marker; /** * Point of explosion (mark pushed away from center) * * Used by: *Pie* */ explosion?: integer; /** * Smoothed line * * Used by: *Line, Scatter* */ smooth?: boolean; /** * Bubble size * * Used by: *Bubble* */ bubbleSize?: NumDataSource; /** * Bubble "3D" shading * * Used by: *Bubble* */ bubble3D?: boolean; /** * Draw an alternate style for negative numbers * * Used by: *Bar, Bubble* */ invertIfNegative?: boolean; /** * Category data * * Used by: *Area, Bar, Line, Pie, Radar, Surface* * * In *Bubble* and *Scatter* charts these are the x-axis values. */ cat?: AxDataSource; /** * Value data * * Used by: *Area, Bar, Line, Pie, Radar, Surface* * * In *Bubble* and *Scatter* charts these are the y-axis values. */ val?: NumDataSource; }; //#endregion //#region src/handler/charts/types/plots/AreaChart.d.ts type AreaChartShared = { axId: [integer, integer]; grouping?: Grouping; varyColors?: boolean; ser?: Series[]; dLbls?: DLbls; dropLines?: ChartLines; }; type AreaChart = AreaChartShared & { type: 'area'; }; type AreaChart3d = AreaChartShared & { type: 'area3d'; /** * @min 0 * @max 500 */ gapDepth?: integer; axId: [integer, integer] | [integer, integer, integer]; }; //#endregion //#region src/handler/charts/types/plots/BarDir.d.ts type BarDir = 'bar' | 'col'; //#endregion //#region src/handler/charts/types/plots/BarGrouping.d.ts type BarGrouping = 'percentStacked' | 'clustered' | 'standard' | 'stacked'; //#endregion //#region src/handler/charts/types/plots/BarChart.d.ts type BarChartShared = { barDir: BarDir; /** @default "clustered" */ grouping?: BarGrouping; varyColors?: boolean; ser?: Series[]; dLbls?: DLbls; }; type BarChart = BarChartShared & { type: 'bar'; /** * @min 0 * @max 500 * @default "150%" */ gapWidth?: integer; /** * @min -100 * @max 100 * @default "0%" */ overlap?: integer; serLines?: ChartLines[]; axId: [integer, integer]; }; type BarChart3d = BarChartShared & { type: 'bar3d'; /** * @min 0 * @max 500 * @default "150%" */ gapWidth?: integer; /** * @min 0 * @max 500 * @default "150%" */ gapDepth?: integer; shape?: BarShape; axId: [integer, integer] | [integer, integer, integer]; }; //#endregion //#region src/handler/charts/types/plots/SizeRepresents.d.ts type SizeRepresents = 'area' | 'w'; //#endregion //#region src/handler/charts/types/plots/BubbleChart.d.ts /** * */ type BubbleChart = { type: 'bubble'; varyColors?: boolean; ser?: Series[]; dLbls?: DLbls; bubble3D?: boolean; /** * @min 0 * @max 300 * @defaultValue "100%" */ bubbleScale?: integer; showNegBubbles?: boolean; /** * @defaultValue "area" */ sizeRepresents?: SizeRepresents; axId: [integer, integer]; }; //#endregion //#region src/handler/charts/types/plots/UpDownBars.d.ts type UpDownBar = { shape?: Shape; }; /** * */ type UpDownBars = { /** * @min 0 * @max 500 * @default 150 */ gapWidth?: integer; upBars?: UpDownBar; downBars?: UpDownBar; }; //#endregion //#region src/handler/charts/types/plots/LineChart.d.ts type LineChartShared = { /** @default "standard" */grouping: Grouping; varyColors?: boolean; ser?: Series[]; dLbls?: DLbls; dropLines?: ChartLines; }; type LineChart = LineChartShared & { type: 'line'; hiLowLines?: ChartLines; upDownBars?: UpDownBars; marker?: boolean; smooth?: boolean; axId: [integer, integer]; }; type LineChart3d = LineChartShared & { type: 'line3d'; /** * @min 0 * @max 500 * @default "150%" */ gapDepth?: integer; axId: [integer, integer, integer]; }; //#endregion //#region src/handler/charts/types/plots/OfPieType.d.ts type OfPieType = 'pie' | 'bar'; //#endregion //#region src/handler/charts/types/SplitType.d.ts type SplitType = 'auto' | 'cust' | 'percent' | 'pos' | 'val'; //#endregion //#region src/handler/charts/types/plots/CustSplit.d.ts /** * */ type CustSplit = { secondPiePt?: integer[]; }; //#endregion //#region src/handler/charts/types/plots/PieChart.d.ts type PieChartShared = { varyColors?: boolean; ser?: Series[]; dLbls?: DLbls; }; type PieChart = PieChartShared & { type: 'pie'; /** * @min 0 * @max 360 * @default 0 */ firstSliceAng?: number; }; type OfPieChart = PieChartShared & { type: 'ofPie'; ofPieType: OfPieType; /** * @min 0 * @max 500 * @default "150%" */ gapWidth?: integer; splitType?: SplitType; splitPos?: number; custSplit?: CustSplit; /** * @min 5 * @max 200 * @default "75%" */ secondPieSize?: integer; serLines?: ChartLines[]; }; type PieChart3d = PieChartShared & { type: 'pie3d'; }; type DoughnutChart = PieChartShared & { type: 'doughnut'; firstSliceAng?: number; /** * @min 1 * @max 90 * @default "10%" */ holeSize?: integer; }; //#endregion //#region src/handler/charts/types/plots/RadarStyle.d.ts type RadarStyle = 'standard' | 'marker' | 'filled'; //#endregion //#region src/handler/charts/types/plots/RadarChart.d.ts /** * */ type RadarChart = { type: 'radar'; radarStyle: RadarStyle; varyColors?: boolean; ser?: Series[]; dLbls?: DLbls; axId: [integer, integer]; }; //#endregion //#region src/handler/charts/types/plots/ScatterStyle.d.ts type ScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker'; //#endregion //#region src/handler/charts/types/plots/ScatterChart.d.ts /** * */ type ScatterChart = { type: 'scatter'; scatterStyle: ScatterStyle; varyColors?: boolean; ser?: Series[]; dLbls?: DLbls; axId: [integer, integer]; }; //#endregion //#region src/handler/charts/types/plots/StockChart.d.ts /** * */ type StockChart = { type: 'stock'; ser: [Series, Series, Series] | [Series, Series, Series, Series]; dLbls?: DLbls; dropLines?: ChartLines; hiLowLines?: ChartLines; upDownBars?: UpDownBars; axId: [integer, integer]; }; //#endregion //#region src/handler/charts/types/series/BandFmt.d.ts /** * */ type BandFmt = { idx: integer; shape?: Shape; }; //#endregion //#region src/handler/charts/types/series/BandFmts.d.ts /** * */ type BandFmts = { bandFmt?: BandFmt[]; }; //#endregion //#region src/handler/charts/types/plots/SurfaceChart.d.ts type SurfaceChartShared = { wireframe?: boolean; ser?: Series[]; bandFmts?: BandFmts; }; type SurfaceChart = SurfaceChartShared & { type: 'surface'; axId: [integer, integer]; }; type SurfaceChart3d = SurfaceChartShared & { type: 'surface3d'; axId: [integer, integer, integer]; }; //#endregion //#region src/handler/charts/types/plots/WaterfallChart.d.ts type WaterfallChart = { type: 'waterfall'; ser: Series[]; axId: [integer, integer]; subtotals?: number[]; connectorLines?: boolean; fmtOvrs?: { idx: number; shape: Shape; }[]; }; //#endregion //#region src/handler/charts/types/plots/Plot.d.ts type Plot = (AreaChart | AreaChart3d | LineChart | LineChart3d | StockChart | RadarChart | ScatterChart | PieChart | PieChart3d | OfPieChart | DoughnutChart | BarChart | BarChart3d | SurfaceChart | SurfaceChart3d | BubbleChart | WaterfallChart); //#endregion //#region src/handler/charts/types/DTable.d.ts type DTable = { showHorzBorder?: boolean; showVertBorder?: boolean; showOutline?: boolean; showKeys?: boolean; shape?: Shape; textProps?: TextProps; }; //#endregion //#region src/handler/charts/types/PlotArea.d.ts type PlotArea = { dTable?: DTable; layout?: ManualLayout; shape?: Shape; plots: Plot[]; axes: Axis[]; }; //#endregion //#region src/handler/charts/types/Chart.d.ts type Chart = { type: 'bc'; plotArea: PlotArea; autoTitleDeleted?: boolean; plotVisOnly?: boolean; showDLblsOverMax?: boolean; title?: Title; pivotFmts?: PivotFmts; view3D?: View3d; floor?: Surface; sideWall?: Surface; backWall?: Surface; legend?: Legend; /** * @default "zero" */ dispBlanksAs?: DispBlanksAs; }; //#endregion //#region src/handler/charts/types/ChartSpace.d.ts type ChartSpace = { date1904?: boolean; roundedCorners?: boolean; lang?: string; /** * @min 1 * @max 48 */ style?: integer; chart: Chart; shape?: Shape; textProps?: TextProps; }; //#endregion //#region src/convertBinary.d.ts /** @ignore */ type ExtendedWorkbook = Workbook & { charts?: Record; }; /** * Convert an XLSX binary into a JSON format. * * The returned JSF structure contains most of the data from the original file, although some details * may be lost in the conversion process. * * @param buffer Buffer containing the file to convert * @param filename Name of the file being converted * @param [options] Conversion options * @return A JSON spreadsheet formatted object. */ declare function convertBinary(buffer: Buffer | ArrayBuffer, filename: string, options?: ConversionOptions): Promise; /** * An experimental version of convertBinary that includes charts the workbook payload. * * @param buffer Buffer containing the file to convert * @param filename Name of the file being converted * @param [options] Conversion options * @return A JSON spreadsheet formatted object. * @ignore */ declare function convertBinaryFuture(buffer: Buffer | ArrayBuffer, filename: string, options?: ConversionOptions): Promise; //#endregion //#region src/index.d.ts /** Convertion options */ type ConversionOptions = { /** * Skip cells that are a part of merges. * @defaultValue true */ skipMerged?: boolean; /** * Formulas are attached to cells rather than being included as a separate list. * @defaultValue false */ cellFormulas?: boolean; /** * Drop cells that have a style but no value or formula, unless the style is visible (fill, border, etc.). * @defaultValue false */ skipStyledEmptyCells?: boolean; /** * Image reading callback. All read images are passed through this callback if it is provided. * This is useful, for example, for extracting the images to disk. * * If the return value is a string, the value will be used in the images record on * the workbook instead of the standard data-URI conversion. */ imageCallback?: (data?: ArrayBuffer, filename?: string) => Promise | string | void; /** * Warning callback. If provided, warnings are passed to this function; otherwise they are silently discarded. */ warn?: (message: string) => void; /** * Resolve the Max Digit Width (in pixels) for the workbook's Normal font, used to convert column * widths from OOXML character units to pixels. Returning null/undefined defers to the built-in table * (Aptos Narrow, Calibri, Arial); unknown fonts then fall back to MDW 6 (and warn). Supply this to * size columns correctly for fonts outside the table. */ resolveMdw?: MdwResolver; }; /** * Load and convert an XLSX file into a JSON format. * * The returned JSF structure contains most of the data from the original file, although some details * may be lost in the conversion process. * * @param filename Target filename to convert * @param options Conversion options * @param [options.skipMerged] Skip any redundant cells that are a part of merges. * @param [options.cellFormulas] Formulas are attached to cells rather than being included separately. * @param [options.skipStyledEmptyCells] Drop cells that carry a style but no value/formula/data table. * @return A JSON spreadsheet object. */ declare function convert(filename: string, options?: ConversionOptions): Promise; //#endregion export { TrendlineType as $, CSVConversionOptions as $t, LineChart as A, LblAlgn as At, BarGrouping as B, DLblPos as Bt, OfPieChart as C, Crosses as Ct, CustSplit as D, Scaling as Dt, PieChartShared as E, Title as Et, BubbleChart as F, StrRef as Ft, Series as G, LegendEntry as Gt, AreaChart as H, MarkerStyle as Ht, SizeRepresents as I, StrData as It, ErrValType as J, View3d as Jt, BarShape as K, ManualLayout as Kt, BarChart as L, StrVal as Lt, LineChartShared as M, PivotFmt as Mt, UpDownBar as N, DLbl as Nt, SplitType as O, Orientation as Ot, UpDownBars as P, Text as Pt, TrendlineLbl as Q, TextProps as Qt, BarChart3d as R, DLblShared as Rt, DoughnutChart as S, AxShared as St, PieChart3d as T, TickMark as Tt, AreaChart3d as U, Legend as Ut, BarDir as V, Marker as Vt, AreaChartShared as W, LegendPos as Wt, ErrBarType as X, PictureFormat as Xt, ErrDir as Y, Surface as Yt, Trendline as Z, PictureOptions as Zt, StockChart as _, CrossBetween as _t, convertBinaryFuture as a, MdwResolver as an, MultiLvlStrRef as at, RadarChart as b, TimeUnit as bt, PlotArea as c, DPt as ct, WaterfallChart as d, ChartLines as dt, convertCSV as en, NumDataSource as et, SurfaceChart as f, Axis as ft, BandFmt as g, BuiltInUnit as gt, BandFmts as h, DispUnitsLbl as ht, convertBinary as i, UnsupportedError as in, NumVal as it, LineChart3d as j, PivotFmts as jt, OfPieType as k, AxPos as kt, DTable as l, DLbls as lt, SurfaceChartShared as m, DispUnits as mt, convert as n, InvalidFileError as nn, NumRef as nt, ChartSpace as o, MultiLvlStrData as ot, SurfaceChart3d as p, ValAx as pt, ErrBars as q, DispBlanksAs as qt, ExtendedWorkbook as r, MissingSheetError as rn, NumData as rt, Chart as s, Lvl as st, ConversionOptions as t, EncryptionError as tn, AxDataSource as tt, Plot as u, Grouping as ut, ScatterChart as v, SerAx as vt, PieChart as w, TickLblPos as wt, RadarStyle as x, CatAx as xt, ScatterStyle as y, DateAx as yt, BarChartShared as z, NumFmt as zt }; //# sourceMappingURL=index-DzxKfELY.d.cts.map