@sheetxl/sdk 0.8.0-beta.10 → 0.8.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/browser/esm/{CYyv6uGjo10ig5FP.mjs → -Jx-jNHmtIQQfLvK.mjs} +1 -1
- package/browser/esm/{CdLZWVcH8cncBUPJ.mjs → 2WuhYrIpYmOR5H73.mjs} +110 -261
- package/browser/esm/{Cqr3knDsBvoVZ6MN.mjs → 2mIwPy2D2JUX-9wx.mjs} +2 -2
- package/browser/esm/B3wf5vZCsWfWsDbj.mjs +12 -0
- package/browser/esm/{BzLfNyc6OOShIErH.mjs → BIHrHjRGWVlJglcp.mjs} +2 -2
- package/browser/esm/{C9B0djuUarfNdoj0.mjs → BTFBedJMRWGvZyCE.mjs} +1 -1
- package/browser/esm/{Btg43M1Bf-ENDreu.mjs → BdCJNawfifyPupCP.mjs} +1 -1
- package/browser/esm/{ClB5ix51roQOpZEr.mjs → Bg5Di9GLNAkbqQ1P.mjs} +2877 -2067
- package/browser/esm/BnC4-27Igwb8oDf2.mjs +1552 -0
- package/browser/esm/{DhKkrCVASZ6Isvz6.mjs → Bt8_m94tBdks209L.mjs} +1 -1
- package/browser/esm/{zqJOaweiXE9D8RY1.mjs → BudSIfXBAsTxvu-K.mjs} +31835 -40812
- package/browser/esm/C9u8FUewte5ugUjH.mjs +5132 -0
- package/browser/esm/{Di58Ji1n--3Mgc_2.mjs → CBYMTDzMf1Vh7pkw.mjs} +1 -1
- package/browser/esm/CNdjyofiRu6CYOrr.mjs +12835 -0
- package/browser/esm/{Dtoyt8q5RyGAlxCp.mjs → CRkYR-siY2C994KV.mjs} +1 -1
- package/browser/esm/CTe2qfmIUEad6FJv.mjs +199 -0
- package/browser/esm/CUzYuYTTGsChC_kZ.mjs +8422 -0
- package/browser/esm/CdEO8CEee6lEhabA.mjs +117 -0
- package/browser/esm/CfRqiPDg6RBTg1EN.mjs +367 -0
- package/browser/esm/CndRBvVfQUJIYRRj.mjs +193 -0
- package/browser/esm/{Y79I7Sm8kjaYexhf.mjs → CwOPLXU3-9ZHGyOT.mjs} +1 -1
- package/browser/esm/{CjsUGJEQSbGjnH6R.mjs → Cxjxk0ncRKx80I-w.mjs} +1 -1
- package/browser/esm/D2RZh0O9neOsyLAE.mjs +281 -0
- package/browser/esm/{De175LygU7ot4nQm.mjs → D64dM68B1pKYFzdP.mjs} +2 -2
- package/browser/esm/{o8MFgcVXns987D6_.mjs → D9xNz46kAfXMZzp4.mjs} +6 -6
- package/browser/esm/{BcHmrKHwMMOlzc9_.mjs → DK899HhWX1HINMC1.mjs} +55 -55
- package/browser/esm/DPhGQLNGmDZwODwJ.mjs +395 -0
- package/browser/esm/DVroRnhi-5IDXNgM.mjs +210 -0
- package/browser/esm/{Bk7xxbdDpa7-sIwd.mjs → DZiivy0NmO1Vnyzk.mjs} +2 -2
- package/browser/esm/{CZ5oa92wZEAXebgk.mjs → DgrAuRD2qr2DvFeJ.mjs} +78 -68
- package/browser/esm/{D4uVlrG0xEFctsSM.mjs → DobHLF6VjHr7Xi40.mjs} +285 -67
- package/browser/esm/{CSx9ed1JOs7K5BXO.mjs → DwZCT7DZiiXoTweg.mjs} +2 -2
- package/browser/esm/DwwR3O2sEZApPSTF.mjs +86 -0
- package/browser/esm/Tah7cnFb_HNZdLtj.mjs +128 -0
- package/browser/esm/{BEAY9XgKNx-bakXW.mjs → fXWUMDhZ5yMSO629.mjs} +1 -1
- package/browser/esm/{BqskM7wA8oPfFQue.mjs → hCQJcmIzPDxDEv2q.mjs} +2 -2
- package/browser/esm/index.mjs +1294 -1008
- package/browser/esm/{Cgd5BnM3hg9RyUel.mjs → qO-ujUrgq6H3TQix.mjs} +1 -1
- package/browser/esm/w6Jea0TiclPrYZ2M.mjs +1703 -0
- package/browser/esm/yuhcOYw6SHQ-RCm3.mjs +114 -0
- package/licenses/dependencies.txt +75 -75
- package/node/esm/-TA0MneBDKdGhsib.mjs +8668 -0
- package/node/esm/B-HUPAcqvK0eeeCz.mjs +134 -0
- package/node/esm/BL2iiEoqxDEV2Xrg.mjs +8320 -0
- package/node/esm/{C6ZXsNyLXI6zA63X.mjs → BNXLOEddJ6O9gYws.mjs} +9 -9
- package/node/esm/{BH1v-E4Ro3bR7Znw.mjs → BSvOluusoDM4z_dx.mjs} +151 -302
- package/node/esm/{CD9wbvufChVYYkrI.mjs → BskP3b8vUoIOGLY6.mjs} +2 -2
- package/node/esm/{CnSQ7MTXAUAyBOoS.mjs → Btw4148Ot8ifhNc1.mjs} +285 -64
- package/node/esm/{B6D7sSetrcOWLsKj.mjs → C14-R6tifRh7pc0p.mjs} +1 -1
- package/node/esm/C99zzq8DImQXi4BQ.mjs +133 -0
- package/node/esm/{BtuY37FumvLE7EBo.mjs → CBuEu5Jk-LfaDy-H.mjs} +176 -166
- package/node/esm/{DdFgXl-Ux2cMBTs_.mjs → CG-qBU5BAaVz7e-P.mjs} +1 -1
- package/node/esm/CPI58duc0j0a-HpJ.mjs +115 -0
- package/node/esm/CRt3vXe6YmXzqk3H.mjs +406 -0
- package/node/esm/{CUUoseJmFsCf82bb.mjs → C_aL7CGS1lrNn1Ng.mjs} +1 -1
- package/node/esm/{D7MfcID2Wf6l6VpC.mjs → C_xf5Bz30VqiJjXn.mjs} +1 -1
- package/node/esm/CiIymQN6aJCul62g.mjs +610 -0
- package/node/esm/{B9ljpEIZg6wOTzRE.mjs → Ci_zLYmCD7e-C79O.mjs} +1 -1
- package/node/esm/{Bqd62L8KFgdS0Vou.mjs → CkRYLed8Mmn3giNg.mjs} +2 -2
- package/node/esm/D3ptRKzASqBut1DE.mjs +117 -0
- package/node/esm/{DefYISWfdZJFx57m.mjs → D4ROK9UwDpS6jO3Z.mjs} +1 -1
- package/node/esm/D8hO07ToAibIuniw.mjs +13014 -0
- package/node/esm/{Bh4dv6tMjXX3X4nI.mjs → DUTmDHbFbhLDT4F3.mjs} +1 -1
- package/node/esm/{DCplLG93GfTs1vNw.mjs → DV5CU37aEbFbWFL0.mjs} +1 -1
- package/node/esm/{CUQi5ZtMO02nhG0W.mjs → DdoiuKg9BKubtF1V.mjs} +1 -1
- package/node/esm/DggQ23jKMpwhENfa.mjs +372 -0
- package/node/esm/DhS6yWjrrSNIJMsn.mjs +1033 -0
- package/node/esm/{DMD12JUh7HJw2-jl.mjs → DhTya_mhmN53vskv.mjs} +1 -1
- package/node/esm/Dn1M7YWi25DeeYUb.mjs +210 -0
- package/node/esm/DrCf6ITcBhVOFpRj.mjs +86 -0
- package/node/esm/{BN9j8V9gCExMjVtJ.mjs → DxazKtROyaI51dWl.mjs} +1 -1
- package/node/esm/{MiU4rDOiocmJ-9Ry.mjs → Q_S1g46ZOTrdhTae.mjs} +1 -1
- package/node/esm/Vocy-I9dKzZMr0Ct.mjs +59323 -0
- package/node/esm/ZXPFcsT2zrALCZux.mjs +289 -0
- package/node/esm/eimUGjiIP-b8HiM6.mjs +199 -0
- package/node/esm/icn2nX5Z8e_3mNAv.mjs +12 -0
- package/node/esm/index.mjs +2808 -65678
- package/node/esm/lGJ42sHqg5if2bba.mjs +1770 -0
- package/node/esm/{Bsx9uijd4X_SKV3L.mjs → pYtP7wPyS96NQyXS.mjs} +51 -51
- package/package.json +6 -7
- package/resources/contents.json +120 -0
- package/resources/fonts/arial-bold-italic.hinted.json +125 -0
- package/resources/fonts/arial-bold-italic.metrics.json +13 -13
- package/resources/fonts/arial-bold-italic.rows.json +9 -0
- package/resources/fonts/arial-bold.hinted.json +125 -0
- package/resources/fonts/arial-bold.metrics.json +12 -12
- package/resources/fonts/arial-bold.rows.json +9 -0
- package/resources/fonts/arial-italic.hinted.json +125 -0
- package/resources/fonts/arial-italic.metrics.json +13 -13
- package/resources/fonts/arial-italic.rows.json +9 -0
- package/resources/fonts/arial-regular.hinted.json +125 -0
- package/resources/fonts/arial-regular.metrics.json +12 -12
- package/resources/fonts/arial-regular.rows.json +9 -0
- package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
- package/resources/fonts/calibri-bold-italic.metrics.json +2 -2
- package/resources/fonts/calibri-bold-italic.rows.json +9 -0
- package/resources/fonts/calibri-bold.hinted.json +122 -0
- package/resources/fonts/calibri-bold.metrics.json +1 -1
- package/resources/fonts/calibri-bold.rows.json +9 -0
- package/resources/fonts/calibri-italic.hinted.json +121 -0
- package/resources/fonts/calibri-italic.metrics.json +2 -2
- package/resources/fonts/calibri-italic.rows.json +9 -0
- package/resources/fonts/calibri-regular.hinted.json +121 -0
- package/resources/fonts/calibri-regular.metrics.json +1 -1
- package/resources/fonts/calibri-regular.rows.json +9 -0
- package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
- package/resources/fonts/cambria-bold-italic.metrics.json +26 -26
- package/resources/fonts/cambria-bold-italic.rows.json +9 -0
- package/resources/fonts/cambria-bold.hinted.json +108 -0
- package/resources/fonts/cambria-bold.metrics.json +19 -19
- package/resources/fonts/cambria-bold.rows.json +9 -0
- package/resources/fonts/cambria-italic.hinted.json +102 -0
- package/resources/fonts/cambria-italic.metrics.json +23 -23
- package/resources/fonts/cambria-italic.rows.json +9 -0
- package/resources/fonts/cambria-regular.hinted.json +110 -0
- package/resources/fonts/cambria-regular.metrics.json +18 -18
- package/resources/fonts/cambria-regular.rows.json +9 -0
- package/resources/fonts/contents.json +280 -0
- package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-bold-italic.metrics.json +12 -12
- package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
- package/resources/fonts/courier-new-bold.hinted.json +11 -0
- package/resources/fonts/courier-new-bold.metrics.json +12 -12
- package/resources/fonts/courier-new-bold.rows.json +9 -0
- package/resources/fonts/courier-new-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-italic.metrics.json +12 -12
- package/resources/fonts/courier-new-italic.rows.json +9 -0
- package/resources/fonts/courier-new-regular.hinted.json +11 -0
- package/resources/fonts/courier-new-regular.metrics.json +12 -12
- package/resources/fonts/courier-new-regular.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold-italic.metrics.json +15 -15
- package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold.metrics.json +12 -12
- package/resources/fonts/times-new-roman-bold.rows.json +9 -0
- package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-italic.metrics.json +16 -16
- package/resources/fonts/times-new-roman-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
- package/resources/fonts/times-new-roman-regular.metrics.json +16 -16
- package/resources/fonts/times-new-roman-regular.rows.json +9 -0
- package/resources/locales/de/model.msg.json +93 -9
- package/resources/locales/en/model.msg.json +95 -10
- package/types/scripting-api.json +10809 -8021
- package/types/scripting-enums.json +201 -44
- package/types/scripting.d.ts +17030 -8666
- package/types/src/.generated/wasm/fonts.d.ts +161 -0
- package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
- package/types/src/.generated/wasm/sdk.d.ts +122 -0
- package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
- package/types/src/address/AddressUtils.d.ts +10 -1
- package/types/src/address/_StructuredAddress.d.ts +58 -0
- package/types/src/anomalies/_Anomalies.d.ts +109 -0
- package/types/src/anomalies/_FocusTable.d.ts +11 -0
- package/types/src/anomalies/_FormulaChecks.d.ts +133 -0
- package/types/src/anomalies/_LabelChecks.d.ts +21 -0
- package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
- package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
- package/types/src/border/IBorders.d.ts +16 -0
- package/types/src/calculation/Calculation.d.ts +139 -371
- package/types/src/calculation/ExternalBookBindings.d.ts +2 -3
- package/types/src/calculation/FormulaLiterals.d.ts +2 -1
- package/types/src/calculation/FormulaText.d.ts +18 -2
- package/types/src/calculation/ICalculation.d.ts +133 -18
- package/types/src/calculation/INamedFormulasCollection.d.ts +4 -0
- package/types/src/calculation/NamedFormulaCollection.d.ts +293 -22
- package/types/src/calculation/_CloneBoundary.d.ts +1 -1
- package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
- package/types/src/calculation/_TableExtent.d.ts +60 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +6 -2
- package/types/src/calculation/compiler/CompilerUtils.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +16 -0
- package/types/src/calculation/compiler/Types.d.ts +9 -1
- package/types/src/calculation/engine/CalcBackend.d.ts +953 -0
- package/types/src/calculation/engine/index.d.ts +10 -0
- package/types/src/calculation/executor/CalcExecutor.d.ts +94 -24
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +23 -1
- package/types/src/calculation/executor/_WhatIf.d.ts +50 -0
- package/types/src/calculation/formula/Formula.d.ts +9 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +10 -3
- package/types/src/calculation/formula/IFormulaBlock.d.ts +21 -0
- package/types/src/calculation/formula/LambdaValue.d.ts +5 -3
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +5 -1
- package/types/src/calculation/functions/_DataTableFunction.d.ts +14 -0
- package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +0 -12
- package/types/src/calculation/grid/CalcGrid.d.ts +44 -10
- package/types/src/calculation/grid/CalcGridBackend.d.ts +35 -27
- package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -2
- package/types/src/calculation/grid/CalcGridUtils.d.ts +12 -3
- package/types/src/calculation/grid/FormulaHost.d.ts +51 -6
- package/types/src/calculation/grid/ICalcGrid.d.ts +48 -15
- package/types/src/calculation/grid/_CalcRequest.d.ts +28 -6
- package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +29 -2
- package/types/src/calculation/spatial/SpillEntry.d.ts +16 -2
- package/types/src/calculation/state/CalcNode.d.ts +0 -1
- package/types/src/calculation/state/CalcScope.d.ts +44 -6
- package/types/src/calculation/state/CalcState.d.ts +36 -4
- package/types/src/calculation/state/CalculationContext.d.ts +30 -3
- package/types/src/calculation/state/DeferredCalls.d.ts +260 -0
- package/types/src/calculation/state/IContextContainer.d.ts +32 -0
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +6 -0
- package/types/src/calculation/state/_WhatIfLayer.d.ts +91 -0
- package/types/src/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
- package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
- package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
- package/types/src/calculation/toolkit/index.d.ts +12 -0
- package/types/src/cell/ICell.d.ts +302 -34
- package/types/src/cell/ICellHeader.d.ts +7 -6
- package/types/src/cell/ICellProtection.d.ts +1 -1
- package/types/src/cellControl/CellControl.d.ts +67 -0
- package/types/src/cellControl/CellControlCollection.d.ts +29 -0
- package/types/src/cellControl/CellControlRegistry.d.ts +47 -0
- package/types/src/cellControl/ICellControl.d.ts +99 -0
- package/types/src/cellControl/ICellControlCollection.d.ts +67 -0
- package/types/src/cellControl/index.d.ts +4 -0
- package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
- package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
- package/types/src/cellRange/ICellRange.d.ts +525 -110
- package/types/src/cellRange/ICellRanges.d.ts +12 -6
- package/types/src/chart/Chart.d.ts +217 -15
- package/types/src/chart/ChartCollection.d.ts +7 -2
- package/types/src/chart/IChart.d.ts +1921 -35
- package/types/src/chart/IChartCollection.d.ts +27 -2
- package/types/src/chart/_ChartParts.d.ts +1066 -0
- package/types/src/chart/_ChartSource.d.ts +47 -0
- package/types/src/chart/createChart.d.ts +26 -0
- package/types/src/chart/index.d.ts +4 -0
- package/types/src/chart/kinds/ChartKind.d.ts +252 -0
- package/types/src/chart/kinds/_Area.d.ts +3 -0
- package/types/src/chart/kinds/_Bar.d.ts +4 -0
- package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
- package/types/src/chart/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/kinds/_Funnel.d.ts +4 -0
- package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
- package/types/src/chart/kinds/_Histogram.d.ts +4 -0
- package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
- package/types/src/chart/kinds/_Line.d.ts +4 -0
- package/types/src/chart/kinds/_OfPie.d.ts +4 -0
- package/types/src/chart/kinds/_Pie.d.ts +4 -0
- package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
- package/types/src/chart/kinds/_Radar.d.ts +4 -0
- package/types/src/chart/kinds/_Scatter.d.ts +8 -0
- package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
- package/types/src/chart/kinds/_Surface.d.ts +4 -0
- package/types/src/chart/kinds/_Treemap.d.ts +4 -0
- package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
- package/types/src/chart/kinds/_builtIns.d.ts +11 -0
- package/types/src/chart/layout/ChartLayout.d.ts +829 -0
- package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
- package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
- package/types/src/chart/layout/_HitTest.d.ts +36 -0
- package/types/src/chart/layout/_Layout.d.ts +25 -0
- package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
- package/types/src/chart/math/BoxStats.d.ts +35 -0
- package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
- package/types/src/chart/math/DisplayUnits.d.ts +53 -0
- package/types/src/chart/math/Histogram.d.ts +48 -0
- package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
- package/types/src/chart/math/Treemap.d.ts +28 -0
- package/types/src/chart/math/Trendlines.d.ts +71 -0
- package/types/src/chart/math/UnitCalcs.d.ts +98 -0
- package/types/src/chart/model/ChartModel.d.ts +681 -0
- package/types/src/chart/model/_ChartType.d.ts +14 -0
- package/types/src/chart/model/_Edits.d.ts +489 -0
- package/types/src/chart/model/_Grouping.d.ts +83 -0
- package/types/src/chart/model/_Inference.d.ts +52 -0
- package/types/src/chart/model/_ModelFacts.d.ts +112 -0
- package/types/src/chart/model/_NewChart.d.ts +208 -0
- package/types/src/chart/model/_OfPie.d.ts +18 -0
- package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
- package/types/src/chart/resolve/_Resolve.d.ts +61 -0
- package/types/src/chart/resolve/_ResolvedChart.d.ts +447 -0
- package/types/src/collections/ISparseGrid.d.ts +11 -2
- package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
- package/types/src/collections/RTree.d.ts +116 -36
- package/types/src/collections/SparseGrid.d.ts +9 -11
- package/types/src/collections/SpatialMap.d.ts +2 -8
- package/types/src/collections/SpatialMap3D.d.ts +2 -0
- package/types/src/collections/index.d.ts +1 -1
- package/types/src/comment/Comment.d.ts +32 -9
- package/types/src/comment/IComment.d.ts +41 -4
- package/types/src/comment/_NoteBox.d.ts +19 -2
- package/types/src/condition/AnchoredConditional.d.ts +30 -4
- package/types/src/condition/ICondition.d.ts +3 -2
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +9 -3
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
- package/types/src/dataValidation/DataValidation.d.ts +1 -1
- package/types/src/dataValidation/DataValidationCollection.d.ts +4 -1
- package/types/src/dataValidation/IDataValidation.d.ts +1 -1
- package/types/src/dataValidation/IDataValidationCollection.d.ts +24 -0
- package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
- package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
- package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
- package/types/src/documentProperties/index.d.ts +3 -0
- package/types/src/externalBook/IExternalBook.d.ts +3 -4
- package/types/src/fetch/Fetcher.d.ts +15 -0
- package/types/src/fetch/IFetcher.d.ts +47 -0
- package/types/src/fetch/_WorkbookFetch.d.ts +43 -0
- package/types/src/fetch/index.d.ts +3 -0
- package/types/src/fill/IFill.d.ts +7 -0
- package/types/src/fill/IFillable.d.ts +47 -0
- package/types/src/fill/IStroke.d.ts +15 -1
- package/types/src/fill/PaintUtils.d.ts +24 -0
- package/types/src/fill/index.d.ts +2 -0
- package/types/src/font/AdvanceBuilder.d.ts +34 -0
- package/types/src/font/AdvanceTable.d.ts +128 -14
- package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
- package/types/src/font/FontCapture.d.ts +4 -0
- package/types/src/font/FontCollection.d.ts +53 -2
- package/types/src/font/FontPlatform.d.ts +20 -0
- package/types/src/font/FontUtils.d.ts +5 -0
- package/types/src/font/IFont.d.ts +191 -61
- package/types/src/font/IFontCollection.d.ts +20 -14
- package/types/src/font/IFontStyle.d.ts +207 -0
- package/types/src/font/TableFileAdvanceBuilder.d.ts +9 -0
- package/types/src/font/_FontUtils.d.ts +11 -4
- package/types/src/font/_FontsVersion.d.ts +7 -0
- package/types/src/font/index.d.ts +1 -3
- package/types/src/font/platform.browser.d.ts +15 -0
- package/types/src/font/platform.node.d.ts +5 -0
- package/types/src/group/Group.d.ts +5 -0
- package/types/src/group/GroupMovableCollection.d.ts +4 -0
- package/types/src/history/IHistory.d.ts +19 -2
- package/types/src/hyperlink/IHyperlink.d.ts +17 -1
- package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
- package/types/src/index.d.ts +4 -0
- package/types/src/license/LicenseManager.d.ts +21 -0
- package/types/src/license/_Utils.d.ts +18 -1
- package/types/src/license/runtime.browser.d.ts +5 -0
- package/types/src/license/runtime.node.d.ts +10 -0
- package/types/src/listener/IListener.d.ts +14 -2
- package/types/src/listener/ListenerEmitter.d.ts +11 -3
- package/types/src/movable/IMovable.d.ts +28 -15
- package/types/src/movable/IMovableCollection.d.ts +1 -1
- package/types/src/movable/Movable.d.ts +12 -1
- package/types/src/movable/MovableCollection.d.ts +7 -3
- package/types/src/movable/_InsertableCollection.d.ts +16 -5
- package/types/src/named/INamed.d.ts +30 -0
- package/types/src/named/INamedCollection.d.ts +38 -2
- package/types/src/named/NamedCollection.d.ts +34 -4
- package/types/src/numFmt/NumberFormatParser.d.ts +5 -0
- package/types/src/outline/IOutline.d.ts +1 -1
- package/types/src/outline/Outline.d.ts +2 -2
- package/types/src/picture/IPicture.d.ts +98 -1
- package/types/src/picture/Picture.d.ts +15 -7
- package/types/src/pivot/IPivotTable.d.ts +2 -2
- package/types/src/pivot/PivotTable.d.ts +5 -5
- package/types/src/primitives/AsyncValue.d.ts +58 -0
- package/types/src/primitives/ReferenceRange.d.ts +2 -2
- package/types/src/print/IPageLayout.d.ts +635 -0
- package/types/src/print/PageLayout.d.ts +258 -0
- package/types/src/print/index.d.ts +1 -1
- package/types/src/protectedRange/IProtectedRange.d.ts +2 -2
- package/types/src/protection/IProtection.d.ts +6 -0
- package/types/src/protection/PasswordHasher.d.ts +13 -0
- package/types/src/resource/IResource.d.ts +9 -0
- package/types/src/resource/IResourceCollection.d.ts +4 -0
- package/types/src/resource/Resource.d.ts +2 -0
- package/types/src/resource/_AddResource.d.ts +13 -0
- package/types/src/richData/CellImage.d.ts +95 -0
- package/types/src/richData/Hyperlink.d.ts +49 -0
- package/types/src/richData/IRichDataCollection.d.ts +76 -0
- package/types/src/richData/IRichDataKind.d.ts +66 -0
- package/types/src/richData/RichArray.d.ts +42 -0
- package/types/src/richData/RichDataCollection.d.ts +23 -0
- package/types/src/richData/RichDataRegistry.d.ts +89 -0
- package/types/src/richData/RichDataValues.d.ts +20 -0
- package/types/src/richData/RichRecord.d.ts +68 -0
- package/types/src/richData/RichText.d.ts +59 -0
- package/types/src/richData/index.d.ts +9 -0
- package/types/src/scripting/FunctionArguments.d.ts +17 -1
- package/types/src/scripting/FunctionCollection.d.ts +8 -0
- package/types/src/scripting/IModule.d.ts +3 -3
- package/types/src/scripting/IScript.d.ts +2 -2
- package/types/src/scripting/ITypedFunction.d.ts +1 -1
- package/types/src/scripting/Scripts.d.ts +10 -0
- package/types/src/scripting/TypedFunction.d.ts +2 -0
- package/types/src/scripting/declarations.d.ts +3 -0
- package/types/src/selection/ChartElementSelection.d.ts +39 -0
- package/types/src/selection/IChartElementSelection.d.ts +103 -0
- package/types/src/selection/IItemSelection.d.ts +131 -0
- package/types/src/selection/IMovableSelection.d.ts +6 -34
- package/types/src/selection/IRangeSelection.d.ts +4 -4
- package/types/src/selection/ItemSelection.d.ts +49 -0
- package/types/src/selection/MovableSelection.d.ts +11 -30
- package/types/src/selection/RangeSelection.d.ts +4 -4
- package/types/src/selection/index.d.ts +3 -0
- package/types/src/shape/IShape.d.ts +2 -1
- package/types/src/shape/IShapeStyle.d.ts +5 -31
- package/types/src/shape/ITextBoxStyle.d.ts +85 -0
- package/types/src/shape/ShapeStyleUtils.d.ts +13 -1
- package/types/src/shape/_Connectors.d.ts +9 -9
- package/types/src/shape/_ShapeStyle.d.ts +9 -0
- package/types/src/shape/index.d.ts +1 -0
- package/types/src/sheet/CellRegion.d.ts +37 -3
- package/types/src/sheet/ICellContainerOptions.d.ts +6 -0
- package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
- package/types/src/sheet/ISheet.d.ts +81 -1078
- package/types/src/sheet/IWorksheet.d.ts +1521 -0
- package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +37 -12
- package/types/src/sheet/NamedCellRange.d.ts +2 -2
- package/types/src/sheet/NamedRange.d.ts +2 -2
- package/types/src/sheet/OpaqueSheet.d.ts +114 -0
- package/types/src/sheet/SheetCell.d.ts +40 -27
- package/types/src/sheet/SheetRange.d.ts +50 -13
- package/types/src/sheet/SheetRanges.d.ts +14 -12
- package/types/src/sheet/{Sheet.d.ts → Worksheet.d.ts} +591 -171
- package/types/src/sheet/WorksheetCollection.d.ts +39 -0
- package/types/src/sheet/_CellBuffer.d.ts +11 -1
- package/types/src/sheet/_CopyUtils.d.ts +13 -6
- package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +3 -2
- package/types/src/sheet/_Kinds.d.ts +34 -0
- package/types/src/sheet/_Labels.d.ts +38 -0
- package/types/src/sheet/_ListenerAnchor.d.ts +7 -1
- package/types/src/sheet/_RangeStateSweep.d.ts +2 -3
- package/types/src/sheet/_ScalarListFactory.d.ts +55 -7
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +3 -3
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +3 -3
- package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
- package/types/src/sheet/_SheetCoords.d.ts +3 -3
- package/types/src/sheet/_SheetEvents.d.ts +1 -1
- package/types/src/sheet/_SheetFilterUtils.d.ts +6 -6
- package/types/src/sheet/_SheetIntents.d.ts +32 -14
- package/types/src/sheet/_SheetMessages.d.ts +1 -1
- package/types/src/sheet/_SheetMutations.d.ts +11 -9
- package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
- package/types/src/sheet/_SheetStateReader.d.ts +18 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +80 -9
- package/types/src/sheet/_SheetUtils.d.ts +20 -19
- package/types/src/sheet/_WatchAnchor.d.ts +15 -2
- package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
- package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
- package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/style/SheetCellStyle.d.ts +67 -86
- package/types/src/sheet/style/SheetDirectStyle.d.ts +3 -3
- package/types/src/sheet/style/SheetNamedStyle.d.ts +2 -0
- package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
- package/types/src/sheet/style/_Resolvers.d.ts +3 -2
- package/types/src/sheet/style/_StyleUtils.d.ts +7 -43
- package/types/src/sheetHeader/ISheetHeader.d.ts +2 -2
- package/types/src/sheetHeader/SheetCellHeader.d.ts +2 -0
- package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
- package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +7 -6
- package/types/src/sheetHeader/_HeaderUtils.d.ts +2 -3
- package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +28 -28
- package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
- package/types/src/sheetProtection/index.d.ts +1 -1
- package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +168 -61
- package/types/src/sheetView/WorksheetView.d.ts +139 -0
- package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
- package/types/src/sheetView/index.d.ts +1 -1
- package/types/src/slicer/ISlicer.d.ts +2 -2
- package/types/src/sort/ISort.d.ts +35 -5
- package/types/src/style/ICellStyle.d.ts +56 -44
- package/types/src/style/_BuiltInStyleDefs.d.ts +4 -3
- package/types/src/table/AnchoredTable.d.ts +23 -7
- package/types/src/table/AutoTable.d.ts +1 -1
- package/types/src/table/ITable.d.ts +32 -19
- package/types/src/table/_NamedTable.d.ts +3 -3
- package/types/src/table/_NamedTableSource.d.ts +2 -2
- package/types/src/text/IText.d.ts +4 -51
- package/types/src/text/TextEngine.d.ts +34 -0
- package/types/src/text/TextFrame.d.ts +4 -2
- package/types/src/text/TextRun.d.ts +3 -2
- package/types/src/text/TextWrapper.d.ts +32 -26
- package/types/src/text/_TextUtils.d.ts +5 -5
- package/types/src/text/_TextWrapperFallback.d.ts +49 -0
- package/types/src/text/impl/TabStrategy.d.ts +3 -1
- package/types/src/text/richtext/IRichText.d.ts +16 -2
- package/types/src/text/richtext/index.d.ts +0 -1
- package/types/src/theme/ITheme.d.ts +108 -7
- package/types/src/theme/ThemeCollection.d.ts +5 -0
- package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
- package/types/src/transaction/ITransaction.d.ts +20 -1
- package/types/src/transaction/Transaction.d.ts +8 -1
- package/types/src/transaction/_BatchHandle.d.ts +118 -0
- package/types/src/type/AbstractCollection.d.ts +4 -13
- package/types/src/type/ICollection.d.ts +17 -4
- package/types/src/type/IProperties.d.ts +1 -1
- package/types/src/utils/_CSSUtils.d.ts +1 -1
- package/types/src/wasm/_fontsWasm.d.ts +7 -0
- package/types/src/wasm/_sdkWasm.d.ts +1 -1
- package/types/src/wasm/fontsWasm.d.ts +32 -0
- package/types/src/wasm/index.d.ts +1 -0
- package/types/src/wasm/loader.browser.d.ts +9 -0
- package/types/src/wasm/loader.node.d.ts +9 -0
- package/types/src/wasm/sdkWasm.d.ts +6 -3
- package/types/src/workbook/IWorkbook.d.ts +269 -39
- package/types/src/workbook/Workbook.d.ts +102 -25
- package/types/src/workbook/WorkbookRange.d.ts +2 -2
- package/types/src/workbook/WorkbookRanges.d.ts +3 -3
- package/types/src/workbook/_WorkbookIntents.d.ts +2 -2
- package/types/src/workbook/_WorkbookMessages.d.ts +5 -0
- package/types/src/workbookView/IWorkbookView.d.ts +82 -0
- package/types/src/workbookView/WorkbookView.d.ts +21 -0
- package/browser/esm/BbSmt62FpFIpoVzu.mjs +0 -392
- package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +0 -412
- package/browser/esm/DOMHmhYzPcLVcpAW.mjs +0 -7
- package/browser/esm/DUvUK61b2_4pf4tG.mjs +0 -484
- package/node/esm/CCouEwT37f08qO3V.mjs +0 -7
- package/node/esm/CImNvdz1iP-lUlro.mjs +0 -610
- package/node/esm/CT0CN82y0_Qgoryk.mjs +0 -7568
- package/node/esm/DHUADiCmxNQS1ARz.mjs +0 -417
- package/node/esm/Ds0d8zXzmgOu3MGx.mjs +0 -403
- package/types/src/chart/_ChartXml.d.ts +0 -70
- package/types/src/collections/OverlappingRangeIterator.d.ts +0 -87
- package/types/src/collections/_RangeSweep.d.ts +0 -97
- package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
- package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
- package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
- package/types/src/print/IPrint.d.ts +0 -212
- package/types/src/sheet/SheetCollection.d.ts +0 -29
- package/types/src/sheetProtection/SheetProtection.d.ts +0 -51
- package/types/src/sheetView/SheetView.d.ts +0 -122
- package/types/src/text/richtext/IStyledFont.d.ts +0 -330
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
import { Bounds, Point, Size } from '@sheetxl/utils';
|
|
1
2
|
import { IListener } from '../listener';
|
|
2
3
|
import { ITransaction } from '../transaction';
|
|
3
4
|
import { IResource } from '../resource';
|
|
4
5
|
import { IModel } from '../model';
|
|
5
6
|
import { IMovable } from '../movable';
|
|
6
7
|
import { IEmbeddedPart } from '../io';
|
|
7
|
-
import { ICellRange } from '../cellRange';
|
|
8
|
+
import { ICellRange, ICellRanges } from '../cellRange';
|
|
9
|
+
import { IAnchored } from '../anchored';
|
|
10
|
+
import { IShapeStyle, ITextBoxStyle } from '../shape';
|
|
11
|
+
import { ChartModel } from './model/ChartModel';
|
|
12
|
+
import { ChartLayout } from './layout/ChartLayout';
|
|
8
13
|
/**
|
|
9
14
|
* Interface for working with a chart.
|
|
10
15
|
*
|
|
11
16
|
* @remarks
|
|
12
17
|
* A chart is the content of a movable, which places it — see {@link IChart.getMovable}.
|
|
13
|
-
* Until the chart is modeled it is carried as the markup it was read from and written back
|
|
14
|
-
* unchanged; {@link IChart.getXML} is the read-only view of that markup.
|
|
15
18
|
*/
|
|
16
19
|
export interface IChart extends IModel, IMovable.IContent {
|
|
17
20
|
/**
|
|
@@ -24,14 +27,13 @@ export interface IChart extends IModel, IMovable.IContent {
|
|
|
24
27
|
*/
|
|
25
28
|
getChartTitle(): string | null;
|
|
26
29
|
/**
|
|
27
|
-
* Returns the chart's type, or `'unknown'`.
|
|
30
|
+
* Returns the chart's type, by the names of {@link IChart.Type}, or `'unknown'`.
|
|
28
31
|
*
|
|
29
32
|
* @remarks
|
|
30
|
-
* `'
|
|
31
|
-
* `'
|
|
32
|
-
* `'
|
|
33
|
-
*
|
|
34
|
-
* is `'combo'`, and {@link IChart.ISeries.getChartType} says how each one is drawn.
|
|
33
|
+
* `'columnClustered'`, `'barStacked100'`, `'lineMarkers'`, `'pie'`, `'xyscatter'`,
|
|
34
|
+
* `'waterfall'`, `'pareto'` and so on. A chart whose groups of series are drawn differently is
|
|
35
|
+
* `'combo'`, and {@link IChart.ISeries.getChartType} says how each series is drawn. Within one group
|
|
36
|
+
* series may differ in markers; the chart then answers its first series' type, as Excel does.
|
|
35
37
|
*/
|
|
36
38
|
getChartType(): string;
|
|
37
39
|
/**
|
|
@@ -43,9 +45,202 @@ export interface IChart extends IModel, IMovable.IContent {
|
|
|
43
45
|
*/
|
|
44
46
|
getSeries(): readonly IChart.ISeries[];
|
|
45
47
|
/**
|
|
46
|
-
* Returns the
|
|
48
|
+
* Returns the chart's axes. A pie has none.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* chart.getAxes().getValueAxis()?.setMinimum(0);
|
|
53
|
+
* chart.getAxes().getItems().map(axis => axis.getKind());
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
getAxes(): IChart.IAxes;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the chart's title. A chart always has one to set, shown or not.
|
|
59
|
+
*/
|
|
60
|
+
getTitle(): IChart.ITitle;
|
|
61
|
+
/**
|
|
62
|
+
* Returns the chart's legend. A chart always has one to set, shown or not.
|
|
63
|
+
*/
|
|
64
|
+
getLegend(): IChart.ILegend;
|
|
65
|
+
/**
|
|
66
|
+
* Returns whether each series is a row or a column of the chart's cells, as its first series
|
|
67
|
+
* reads them.
|
|
68
|
+
*/
|
|
69
|
+
getSeriesBy(): 'rows' | 'columns';
|
|
70
|
+
/**
|
|
71
|
+
* Returns the chart's preset style, 1 to 48: the colors and effects Excel's Chart Styles gallery
|
|
72
|
+
* gives the chart's parts. 2 for a chart that states none, as the file format's default.
|
|
73
|
+
*/
|
|
74
|
+
getChartStyle(): number;
|
|
75
|
+
/**
|
|
76
|
+
* Returns how a blank cell is plotted: as a gap, as zero, or with a line drawn across it.
|
|
77
|
+
*/
|
|
78
|
+
getDisplayBlanksAs(): IChart.DisplayBlanksAs;
|
|
79
|
+
/**
|
|
80
|
+
* Sets how a blank cell is plotted.
|
|
81
|
+
*/
|
|
82
|
+
setDisplayBlanksAs(value: IChart.DisplayBlanksAs, options?: ITransaction.OperationOptions): this;
|
|
83
|
+
/**
|
|
84
|
+
* Draws every series as `type`, in one group on the primary axes, as Excel's Change Chart Type
|
|
85
|
+
* does: the series keep their colors, and what each type cannot draw with is restated (a bar's
|
|
86
|
+
* fill becomes a line's color, a pie takes a slice per point).
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* A combo becomes one group; the secondary axes go. Office Scripts' `setChartType`, VBA's
|
|
90
|
+
* `Chart.ChartType`. To change one series, see {@link IChart.ISeries.setChartType}.
|
|
91
|
+
*
|
|
92
|
+
* @throws ExpectedError for a stock type, which Excel makes only from its own series.
|
|
93
|
+
*/
|
|
94
|
+
setChartType(type: IChart.Type | string, options?: ITransaction.OperationOptions): this;
|
|
95
|
+
/**
|
|
96
|
+
* Adds a series with no data, drawn as a new series of the chart's type is, and returns it.
|
|
97
|
+
*
|
|
98
|
+
* @param name The series' name: text, or a cell (`'=Sheet1!$D$1'`).
|
|
99
|
+
* @param index Where the series goes in the plot order, from 0; at the end when left out.
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* Office Scripts' `addChartSeries`, VBA's `SeriesCollection.NewSeries`. Give it data with
|
|
103
|
+
* {@link IChart.ISeries.setValues} and {@link IChart.ISeries.setXAxisValues}, or
|
|
104
|
+
* {@link IChart.ISeries.setFormula}.
|
|
105
|
+
*/
|
|
106
|
+
addSeries(name?: string | ICellRange, index?: number, options?: ITransaction.OperationOptions): IChart.ISeries;
|
|
107
|
+
/**
|
|
108
|
+
* Office Scripts' name for {@link addSeries}.
|
|
109
|
+
*
|
|
110
|
+
* @deprecated Use {@link addSeries}.
|
|
111
|
+
* @hidden
|
|
112
|
+
*/
|
|
113
|
+
addChartSeries(name?: string | ICellRange, index?: number, options?: ITransaction.OperationOptions): IChart.ISeries;
|
|
114
|
+
/**
|
|
115
|
+
* Returns the chart's groups: each the series drawn one way against one pair of axes, with the
|
|
116
|
+
* options they share (VBA's `ChartGroups`). A chart of one type has one group; a combo one per
|
|
117
|
+
* type and axis pair.
|
|
118
|
+
*/
|
|
119
|
+
getGroups(): readonly IChart.IChartGroup[];
|
|
120
|
+
/**
|
|
121
|
+
* VBA's name for {@link getGroups}.
|
|
122
|
+
*
|
|
123
|
+
* @deprecated Use {@link getGroups}.
|
|
124
|
+
* @hidden
|
|
125
|
+
*/
|
|
126
|
+
getChartGroups(): readonly IChart.IChartGroup[];
|
|
127
|
+
/**
|
|
128
|
+
* Reads the chart's cells the other way: each series a row of them, or a column. The same cells,
|
|
129
|
+
* as {@link IChart.setData} reads them with that direction.
|
|
130
|
+
*
|
|
131
|
+
* @throws ExpectedError when the series do not read one block of cells.
|
|
132
|
+
*/
|
|
133
|
+
setSeriesBy(seriesBy: 'rows' | 'columns', options?: ITransaction.OperationOptions): this;
|
|
134
|
+
/** Returns whether hidden rows and columns are left out of the chart. */
|
|
135
|
+
getPlotVisibleOnly(): boolean;
|
|
136
|
+
/** Sets whether hidden rows and columns are left out of the chart. */
|
|
137
|
+
setPlotVisibleOnly(plotVisibleOnly: boolean, options?: ITransaction.OperationOptions): this;
|
|
138
|
+
/**
|
|
139
|
+
* Returns the data labels of every series at once: reads answer the first series', and each
|
|
140
|
+
* setter sets every series (Office Scripts' `chart.getDataLabels()`, VBA's `ApplyDataLabels`).
|
|
141
|
+
*/
|
|
142
|
+
getDataLabels(): IChart.IDataLabels;
|
|
143
|
+
/** Returns the plot area: where the series are drawn, inside the axes' labels. */
|
|
144
|
+
getPlotArea(): IChart.IPlotArea;
|
|
145
|
+
/**
|
|
146
|
+
* Returns the chart area: the whole chart's fill, border and font, the element every other
|
|
147
|
+
* element is inside.
|
|
148
|
+
*/
|
|
149
|
+
getChartArea(): IChart.IChartArea;
|
|
150
|
+
/**
|
|
151
|
+
* Returns the element at `path` (see {@link IChart.IElement.getPath}), or `null` where the chart
|
|
152
|
+
* has none: a path that names nothing, or a part an edit removed.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* chart.getElement('axes/primary/value/title')?.getElementType(); // 'axisTitle'
|
|
157
|
+
* chart.getElement('series/0/points/3'); // the fourth point of series 0
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
getElement(path: string): IChart.IElement | null;
|
|
161
|
+
/**
|
|
162
|
+
* Returns the elements the chart shows, as Excel's Chart Elements list offers them to choose from:
|
|
163
|
+
* the chart area, the plot area, each series, and the title, legend, axes, axis titles, gridlines,
|
|
164
|
+
* data labels, trendlines, error bars, data table and group lines that are shown. Points, markers
|
|
165
|
+
* and legend entries are left out; a series' {@link IChart.ISeries.getPoints} lists its points.
|
|
166
|
+
*/
|
|
167
|
+
getElements(): readonly IChart.IElement[];
|
|
168
|
+
/**
|
|
169
|
+
* Returns the element drawn at `point`: a hit test of the chart as laid out.
|
|
170
|
+
*
|
|
171
|
+
* @param point In px from the chart's top-left, unzoomed, as {@link getLayout} speaks.
|
|
172
|
+
* @param layout The layout to test, as {@link getLayout} answered it, or the size to lay the chart
|
|
173
|
+
* out at; by default the chart is laid out at its movable's bounds.
|
|
174
|
+
* @returns The topmost element there, as Excel stacks them: the title and legend over everything,
|
|
175
|
+
* then data labels, trendlines and error bars, a series' points, the lines under them, axis titles,
|
|
176
|
+
* axes and gridlines, the plot area, and the chart area under it all. `null` outside the chart,
|
|
177
|
+
* or when the chart has no layout.
|
|
178
|
+
*
|
|
179
|
+
* @remarks
|
|
180
|
+
* A press on a bar answers the bar's point; its series is the point's {@link IChart.IElement.getParent | parent}.
|
|
181
|
+
* Excel selects the series on a first press and the point on the next; which to select is the
|
|
182
|
+
* caller's.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts
|
|
186
|
+
* const layout = chart.getLayout({ width: 480, height: 288 });
|
|
187
|
+
* chart.getElementAt({ x: 240, y: 12 }, layout)?.getPath(); // 'title'
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
getElementAt(point: Point, layout?: ChartLayout | Size): IChart.IElement | null;
|
|
191
|
+
/**
|
|
192
|
+
* Returns the box `element` is drawn in, in px from the chart's top-left, or `null` where the
|
|
193
|
+
* chart as laid out draws nothing for it (a hidden part, a point with no value, the data table).
|
|
194
|
+
*
|
|
195
|
+
* @param element The element, or its path.
|
|
196
|
+
* @param layout As for {@link getElementAt}.
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* The chart area's box is the whole chart's, the plot area's its outer box (with its axes'
|
|
200
|
+
* labels), an axis's its line and labels together, a series' its points' boxes together.
|
|
201
|
+
*/
|
|
202
|
+
getElementBounds(element: IChart.IElement | string, layout?: ChartLayout | Size): Bounds | null;
|
|
203
|
+
/** Returns the data table: the chart's values in a table under the plot area, shown or not. */
|
|
204
|
+
getDataTable(): IChart.IDataTable;
|
|
205
|
+
/**
|
|
206
|
+
* Returns what the chart area is drawn with: its fill, its border and the chart's font (Office
|
|
207
|
+
* Scripts' `getFormat()`, VBA's `ChartArea.Format`).
|
|
208
|
+
*
|
|
209
|
+
* @remarks
|
|
210
|
+
* The font is what every text takes unless it states its own. Setting it sets every text in the
|
|
211
|
+
* chart, the title at 1.2 times the size, as Excel's `ChartArea.Font` does.
|
|
212
|
+
*/
|
|
213
|
+
getStyle(): ITextBoxStyle;
|
|
214
|
+
/** Returns whether the chart area's corners are rounded. */
|
|
215
|
+
getRoundedCorners(): boolean;
|
|
216
|
+
/** Sets whether the chart area's corners are rounded. */
|
|
217
|
+
setRoundedCorners(rounded: boolean, options?: ITransaction.OperationOptions): this;
|
|
218
|
+
/**
|
|
219
|
+
* Adds, places or removes a chart element by the names of Excel's Add Chart Element menu
|
|
220
|
+
* (VBA's `SetElement`): `'legendRight'`, `'dataLabelOutsideEnd'`, `'primaryValueAxisTitleRotated'`,
|
|
221
|
+
* `'primaryValueGridLinesMinorMajor'`, `'trendlineAddLinear'`, `'errorBarStandardDeviation'`…
|
|
222
|
+
*
|
|
223
|
+
* @remarks
|
|
224
|
+
* Each name is one of the setters below, applied as Excel applies it: a data label element to
|
|
225
|
+
* every series, a trendline or error bar element to every series that takes one.
|
|
226
|
+
*
|
|
227
|
+
* @throws ExpectedError for an element the chart has no place for (a secondary axis's on a chart
|
|
228
|
+
* without one, a 3-D wall), or one Excel refuses on its type.
|
|
229
|
+
*/
|
|
230
|
+
setElement(element: IChart.Element, options?: ITransaction.OperationOptions): this;
|
|
231
|
+
/**
|
|
232
|
+
* Sets several properties of the chart and its parts at once, as one step to undo.
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```ts
|
|
236
|
+
* chart.update({
|
|
237
|
+
* title: 'Sales by Month',
|
|
238
|
+
* legend: { position: 'right' },
|
|
239
|
+
* valueAxis: { minimum: 0, numberFormat: '#,##0' }
|
|
240
|
+
* });
|
|
241
|
+
* ```
|
|
47
242
|
*/
|
|
48
|
-
|
|
243
|
+
update(update: IChart.Update, options?: ITransaction.OperationOptions): this;
|
|
49
244
|
/**
|
|
50
245
|
* Returns the name of the pivot table the chart draws, or `null` if it is not a pivot chart.
|
|
51
246
|
*
|
|
@@ -54,6 +249,50 @@ export interface IChart extends IModel, IMovable.IContent {
|
|
|
54
249
|
* series name are wherever the table last put them.
|
|
55
250
|
*/
|
|
56
251
|
getPivotSource(): string | null;
|
|
252
|
+
/**
|
|
253
|
+
* Returns the chart laid out as Excel lays it out: every rect, axis scale, tick label, bar and
|
|
254
|
+
* point, in px from the chart's top-left, with every color concrete.
|
|
255
|
+
*
|
|
256
|
+
* @param size The chart's size in px, unzoomed. Defaults to the movable's bounds.
|
|
257
|
+
*
|
|
258
|
+
* @returns `null` when the chart cannot be laid out: it has no size, or it is of a type not yet
|
|
259
|
+
* laid out (waterfall, histogram, pareto, box and whisker, treemap, sunburst, funnel, map).
|
|
260
|
+
*
|
|
261
|
+
* @remarks
|
|
262
|
+
* Values are those the file cached. Automatic axis bounds and units read back as numbers here,
|
|
263
|
+
* the way Excel's `MinimumScale` does.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```ts
|
|
267
|
+
* const layout = chart.getLayout({ width: 480, height: 288 });
|
|
268
|
+
* const valueAxis = layout?.axes.find(axis => axis.kind === 'value');
|
|
269
|
+
* console.log(valueAxis?.min, valueAxis?.max, valueAxis?.majorUnit);
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
getLayout(size?: {
|
|
273
|
+
width: number;
|
|
274
|
+
height: number;
|
|
275
|
+
}): ChartLayout | null;
|
|
276
|
+
/**
|
|
277
|
+
* Replaces every series with the series Excel makes of `source`, as Insert Chart does.
|
|
278
|
+
*
|
|
279
|
+
* @param source The cells: a range, or an address. A bare address is on the chart's sheet; several
|
|
280
|
+
* areas are separated by commas.
|
|
281
|
+
* @param seriesBy Whether each series is a row or a column of the cells. `'auto'` lets the cells
|
|
282
|
+
* decide, as Insert Chart does.
|
|
283
|
+
*
|
|
284
|
+
* @remarks
|
|
285
|
+
* The same as Office Scripts' `setData` and VBA's `SetSourceData`. Series that take the place of
|
|
286
|
+
* existing ones keep how those are drawn; any more are drawn as a new chart of the type draws them.
|
|
287
|
+
*
|
|
288
|
+
* @throws ExpectedError when `source` holds no cells.
|
|
289
|
+
*/
|
|
290
|
+
setData(source: ICellRange | ICellRanges | string, seriesBy?: IChart.SeriesBy, options?: ITransaction.OperationOptions): this;
|
|
291
|
+
/**
|
|
292
|
+
* @see
|
|
293
|
+
* {@link IListener.ISource.addListeners}
|
|
294
|
+
*/
|
|
295
|
+
addListeners(listeners: IChart.IListeners, options?: IListener.Options): IListener.Remove;
|
|
57
296
|
/**
|
|
58
297
|
* Returns the movable that places the chart on the sheet, or `null` if it is not placed by one.
|
|
59
298
|
*
|
|
@@ -66,15 +305,6 @@ export interface IChart extends IModel, IMovable.IContent {
|
|
|
66
305
|
* Deletes the chart, and with it the movable that places it.
|
|
67
306
|
*/
|
|
68
307
|
delete(options?: ITransaction.OperationOptions): void;
|
|
69
|
-
/**
|
|
70
|
-
* Returns the chart's own markup, or `null` if none was captured.
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* Read-only, and the one escape hatch for what the chart does not model yet: it is the
|
|
74
|
-
* `<c:chartSpace>` the chart was read from, not the parts that markup references, with its
|
|
75
|
-
* formulas as they are now. It will be removed when the chart is modeled.
|
|
76
|
-
*/
|
|
77
|
-
getXML(): string | null;
|
|
78
308
|
/** @internal */
|
|
79
309
|
toJSON(toResourceId?: (resource: IResource) => number | null): IChart.JSON | null;
|
|
80
310
|
/** For runtime type checking. */
|
|
@@ -88,6 +318,143 @@ export interface IChart extends IModel, IMovable.IContent {
|
|
|
88
318
|
* {@link IChart}
|
|
89
319
|
*/
|
|
90
320
|
export declare namespace IChart {
|
|
321
|
+
/**
|
|
322
|
+
* A chart type, by the names Office Scripts gives them (`ExcelScript.ChartType`).
|
|
323
|
+
*
|
|
324
|
+
* @remarks
|
|
325
|
+
* A new chart (`sheet.getCharts().add`), or a chart given a type, can be any type of Excel's
|
|
326
|
+
* gallery: the column, bar, line, pie, doughnut, area, scatter, bubble and radar forms, flat or
|
|
327
|
+
* 3-D; the surfaces; and the 2016 types (waterfall, treemap, sunburst, histogram, pareto, box and
|
|
328
|
+
* whisker, funnel, region map), whose model is made and saved as Excel makes it; every one of
|
|
329
|
+
* them is drawn but the region map, which is drawn as a placeholder. A series given a type can be any flat type. A new
|
|
330
|
+
* chart can also be one of the four stock types, made of exactly their series in order
|
|
331
|
+
* (`stockHLC`: high, low, close; `stockOHLC` with the open first; `stockVHLC` and `stockVOHLC`
|
|
332
|
+
* with the volume before them), which no series can be given. The read vocabulary of earlier
|
|
333
|
+
* versions is accepted too: `column` for `columnClustered`, `columnPercentStacked` for
|
|
334
|
+
* `columnStacked100`, `scatter` for `xyscatter`.
|
|
335
|
+
*
|
|
336
|
+
* A kind of the host's own, registered with `ChartKinds`, is `custom:<kind>`: the chart is made
|
|
337
|
+
* as a column chart is, its categories and values on a pair of axes, and laid out and painted by
|
|
338
|
+
* the kind. {@link IChart.getChartType} answers it back.
|
|
339
|
+
*/
|
|
340
|
+
type Type = 'columnClustered' | 'columnStacked' | 'columnStacked100' | 'barClustered' | 'barStacked' | 'barStacked100' | 'line' | 'lineStacked' | 'lineStacked100' | 'lineMarkers' | 'lineMarkersStacked' | 'lineMarkersStacked100' | 'pie' | 'pieExploded' | 'pieOfPie' | 'barOfPie' | 'doughnut' | 'doughnutExploded' | 'area' | 'areaStacked' | 'areaStacked100' | 'xyscatter' | 'xyscatterLines' | 'xyscatterLinesNoMarkers' | 'xyscatterSmooth' | 'xyscatterSmoothNoMarkers' | 'bubble' | 'bubble3DEffect' | 'radar' | 'radarMarkers' | 'radarFilled' | 'stockHLC' | 'stockOHLC' | 'stockVHLC' | 'stockVOHLC' | 'surface' | 'surfaceWireframe' | 'surfaceTopView' | 'surfaceTopViewWireframe' | '3DColumn' | '3DColumnClustered' | '3DColumnStacked' | '3DColumnStacked100' | '3DBarClustered' | '3DBarStacked' | '3DBarStacked100' | '3DLine' | '3DPie' | '3DPieExploded' | '3DArea' | '3DAreaStacked' | '3DAreaStacked100' | 'waterfall' | 'treemap' | 'sunburst' | 'histogram' | 'pareto' | 'boxwhisker' | 'funnel' | 'regionMap';
|
|
341
|
+
/**
|
|
342
|
+
* Whether each series is a row or a column of a chart's cells; `'auto'` lets the cells decide, as
|
|
343
|
+
* Insert Chart does: series in columns when the data is taller than it is wide.
|
|
344
|
+
*/
|
|
345
|
+
type SeriesBy = 'auto' | 'rows' | 'columns';
|
|
346
|
+
/** What an element of a chart is: see {@link IChart.IElement.getElementType}. */
|
|
347
|
+
type ElementType = 'chartArea' | 'title' | 'legend' | 'legendEntry' | 'plotArea' | 'dataTable' | 'axis' | 'axisTitle' | 'gridlines' | 'series' | 'point' | 'marker' | 'dataLabels' | 'dataLabel' | 'trendline' | 'trendlineLabel' | 'errorBars' | 'chartGroup' | 'upDownBars' | 'hiLoLines' | 'dropLines' | 'seriesLines';
|
|
348
|
+
/**
|
|
349
|
+
* A part of a chart: its title, an axis, a series, a point, a trendline… Every part is one, and
|
|
350
|
+
* each is the same object however often it is asked for, across edits that do not remove it.
|
|
351
|
+
*
|
|
352
|
+
* @remarks
|
|
353
|
+
* Each part's own interface says what it sets; this says where it is. Its type flag
|
|
354
|
+
* (`isISeries`, `isIAxis`, `isITitle`…) narrows it to that interface.
|
|
355
|
+
*/
|
|
356
|
+
interface IElement {
|
|
357
|
+
/** Returns the chart the element is part of. */
|
|
358
|
+
getChart(): IChart;
|
|
359
|
+
/**
|
|
360
|
+
* Returns the element this one is part of: a point's series, a gridline's axis, a legend
|
|
361
|
+
* entry's legend. The parts at the top (the title, the legend, the plot area, an axis, a
|
|
362
|
+
* series, a group) are the chart area's; the chart area has none.
|
|
363
|
+
*/
|
|
364
|
+
getParent(): IChart.IElement | null;
|
|
365
|
+
/**
|
|
366
|
+
* Returns what the element is. A series' marker and a point's are both `'marker'`, and the
|
|
367
|
+
* major and minor gridlines both `'gridlines'`; their paths tell them apart.
|
|
368
|
+
*/
|
|
369
|
+
getElementType(): IChart.ElementType;
|
|
370
|
+
/**
|
|
371
|
+
* Returns where the element is in its chart, as {@link IChart.getElement} takes it.
|
|
372
|
+
*
|
|
373
|
+
* @remarks
|
|
374
|
+
* A path is its parts' names joined by `/`, and does not change while the part is there:
|
|
375
|
+
* - `chartArea`, `title`, `legend`, `legend/entries/<n>`, `plotArea`, `dataTable`, and
|
|
376
|
+
* `dataLabels` (every series' at once);
|
|
377
|
+
* - `axes/<primary|secondary>/<category|value|series>`, and an axis's `…/title`,
|
|
378
|
+
* `…/majorGridlines` and `…/minorGridlines`;
|
|
379
|
+
* - `series/<key>`, and a series' `…/marker`, `…/dataLabels`, `…/errorBars/<x|y>`,
|
|
380
|
+
* `…/trendlines/<n>`, `…/trendlines/<n>/label`, `…/points/<n>`, `…/points/<n>/marker` and
|
|
381
|
+
* `…/points/<n>/dataLabel`;
|
|
382
|
+
* - `groups/<n>`, and a group's `…/upDownBars`, `…/hiLoLines`, `…/dropLines` and `…/seriesLines`.
|
|
383
|
+
*
|
|
384
|
+
* A series' key is its index in the file (`c:idx`), which an edit does not change; its place in
|
|
385
|
+
* the plot order can change. A point, a trendline, a legend entry and a group are named by their
|
|
386
|
+
* place, from 0: when one before it is removed, the path names the one that took its place.
|
|
387
|
+
*/
|
|
388
|
+
getPath(): string;
|
|
389
|
+
/**
|
|
390
|
+
* Returns what the element is drawn with, where it is drawn with a fill or a line. An element
|
|
391
|
+
* with text answers an {@link ITextBoxStyle}, which holds its font too.
|
|
392
|
+
*/
|
|
393
|
+
getStyle?(): IShapeStyle;
|
|
394
|
+
}
|
|
395
|
+
/** The chart area: the whole chart, with its fill, border and the font every text takes. */
|
|
396
|
+
interface IChartArea extends IChart.IElement {
|
|
397
|
+
/** Returns what the chart area is drawn with: its fill, border and the chart's font (see {@link IChart.getStyle}). */
|
|
398
|
+
getStyle(): ITextBoxStyle;
|
|
399
|
+
/** Returns whether the chart area's corners are rounded. */
|
|
400
|
+
getRoundedCorners(): boolean;
|
|
401
|
+
/** Sets whether the chart area's corners are rounded. */
|
|
402
|
+
setRoundedCorners(rounded: boolean, options?: ITransaction.OperationOptions): this;
|
|
403
|
+
/** Sets several properties of the chart area at once, as one step to undo. */
|
|
404
|
+
update(update: IChart.IChartArea.Update, options?: ITransaction.OperationOptions): this;
|
|
405
|
+
/** For runtime type checking. */
|
|
406
|
+
readonly isIChartArea: true;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* {@inheritDoc IChart.IChartArea}
|
|
410
|
+
* @see
|
|
411
|
+
* ### **Interface**
|
|
412
|
+
*
|
|
413
|
+
* {@link IChart.IChartArea}
|
|
414
|
+
*/
|
|
415
|
+
namespace IChartArea {
|
|
416
|
+
/** What {@link IChart.IChartArea.update} sets; each field as its setter takes it. */
|
|
417
|
+
interface Update {
|
|
418
|
+
style?: ITextBoxStyle.Update;
|
|
419
|
+
roundedCorners?: boolean;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Options for adding a chart: `sheet.getCharts().add(source, options)`.
|
|
424
|
+
*/
|
|
425
|
+
interface AddOptions extends IMovable.OperationOptions {
|
|
426
|
+
/**
|
|
427
|
+
* The chart's type.
|
|
428
|
+
*
|
|
429
|
+
* @defaultValue `'columnClustered'`
|
|
430
|
+
*/
|
|
431
|
+
type?: IChart.Type | string;
|
|
432
|
+
/**
|
|
433
|
+
* Whether each series is a row or a column of the cells.
|
|
434
|
+
*
|
|
435
|
+
* @defaultValue `'auto'`
|
|
436
|
+
*/
|
|
437
|
+
seriesBy?: IChart.SeriesBy;
|
|
438
|
+
/**
|
|
439
|
+
* The chart's frame in pixels. A size with no position is placed in the middle of the visible
|
|
440
|
+
* window, or at the selection where there is none.
|
|
441
|
+
*
|
|
442
|
+
* @defaultValue Excel's 5 by 3 inches (480 by 288 pixels)
|
|
443
|
+
*/
|
|
444
|
+
bounds?: Partial<Bounds>;
|
|
445
|
+
/**
|
|
446
|
+
* How the chart moves and resizes with the cells under it.
|
|
447
|
+
*
|
|
448
|
+
* @defaultValue {@link IAnchored.Type.TwoCell}
|
|
449
|
+
*/
|
|
450
|
+
anchorType?: IAnchored.Type;
|
|
451
|
+
/**
|
|
452
|
+
* The chart's name.
|
|
453
|
+
*
|
|
454
|
+
* @defaultValue A name made from the type, such as `Chart 3`.
|
|
455
|
+
*/
|
|
456
|
+
name?: string;
|
|
457
|
+
}
|
|
91
458
|
/**
|
|
92
459
|
* One series of a chart: what it is called and the cells it plots.
|
|
93
460
|
*
|
|
@@ -96,7 +463,7 @@ export declare namespace IChart {
|
|
|
96
463
|
* chart's own dialog state it. The formula is the contract: it is what can say `#REF!`, name a
|
|
97
464
|
* defined name, or point at another workbook. The `get…Range` forms resolve the plain case.
|
|
98
465
|
*/
|
|
99
|
-
interface ISeries {
|
|
466
|
+
interface ISeries extends IChart.IElement {
|
|
100
467
|
/**
|
|
101
468
|
* Returns the series' name, or `null` if it has none.
|
|
102
469
|
*
|
|
@@ -141,54 +508,1573 @@ export declare namespace IChart {
|
|
|
141
508
|
*/
|
|
142
509
|
getCategoriesRange(): ICellRange | null;
|
|
143
510
|
/**
|
|
144
|
-
* Returns
|
|
511
|
+
* Returns the formula for a bubble series' sizes, or `null` if the series states none.
|
|
512
|
+
*/
|
|
513
|
+
getBubbleSizesFormula(): string | null;
|
|
514
|
+
/**
|
|
515
|
+
* Returns how the series is drawn, by the names of {@link IChart.Type}. The same as
|
|
516
|
+
* {@link IChart.getChartType} except in a combo, or where series of one group differ in markers.
|
|
145
517
|
*/
|
|
146
518
|
getChartType(): string;
|
|
147
519
|
/**
|
|
148
520
|
* Returns `true` if the series is plotted against the secondary axes.
|
|
149
521
|
*/
|
|
150
522
|
isSecondaryAxis(): boolean;
|
|
523
|
+
/**
|
|
524
|
+
* Sets the series' name: text, a cell, or a formula naming one (`=Sales!$C$3`); `null` for none,
|
|
525
|
+
* which shows as `Series1`.
|
|
526
|
+
*/
|
|
527
|
+
setName(name: string | ICellRange | null, options?: ITransaction.OperationOptions): this;
|
|
528
|
+
/**
|
|
529
|
+
* Sets the values the series plots: cells, a formula naming them, or an array (`{1,2,3}`).
|
|
530
|
+
*/
|
|
531
|
+
setValues(source: ICellRange | string, options?: ITransaction.OperationOptions): this;
|
|
532
|
+
/**
|
|
533
|
+
* Sets the categories the values are plotted against — a scatter or bubble series' x values —
|
|
534
|
+
* as cells, a formula naming them, or an array; `null` for none, which plots against 1, 2, 3…
|
|
535
|
+
*/
|
|
536
|
+
setXAxisValues(source: ICellRange | string | null, options?: ITransaction.OperationOptions): this;
|
|
537
|
+
/**
|
|
538
|
+
* Sets a bubble series' sizes, as cells, a formula naming them, or an array.
|
|
539
|
+
*/
|
|
540
|
+
setBubbleSizes(source: ICellRange | string, options?: ITransaction.OperationOptions): this;
|
|
541
|
+
/**
|
|
542
|
+
* Draws the series as another type, moving it to the group of that type, as Excel does: on its
|
|
543
|
+
* own axes where the type can share them, else on the other pair or new secondary axes. The
|
|
544
|
+
* series is drawn in its own color as a new series of the type is.
|
|
545
|
+
*
|
|
546
|
+
* @remarks
|
|
547
|
+
* Bubble and 3-D types turn every series of the chart into that type. A stock chart's series
|
|
548
|
+
* given another type leaves the stock group, on the other axes.
|
|
549
|
+
*
|
|
550
|
+
* @throws ExpectedError for a stock type, which Excel gives no series, and for a 3-D form, a
|
|
551
|
+
* surface or a 2016 type, which take the whole chart ({@link IChart.setChartType}).
|
|
552
|
+
*/
|
|
553
|
+
setChartType(type: IChart.Type | string, options?: ITransaction.OperationOptions): this;
|
|
554
|
+
/**
|
|
555
|
+
* Returns the axes the series is plotted against; a pie's are `'primary'`.
|
|
556
|
+
*/
|
|
557
|
+
getAxisGroup(): IChart.AxisGroup;
|
|
558
|
+
/**
|
|
559
|
+
* Moves the series to the primary or secondary axes, keeping how it is drawn. The secondary
|
|
560
|
+
* axes are made when the first series moves to them, and removed with the last.
|
|
561
|
+
*/
|
|
562
|
+
setAxisGroup(group: IChart.AxisGroup, options?: ITransaction.OperationOptions): this;
|
|
563
|
+
/**
|
|
564
|
+
* Returns what the series is drawn with: the fill of its bars, areas or slices and its line.
|
|
565
|
+
*
|
|
566
|
+
* @remarks
|
|
567
|
+
* Reads resolve to the series' automatic color where it states none; `setFill(null)` hands the
|
|
568
|
+
* fill back to it.
|
|
569
|
+
*/
|
|
570
|
+
getStyle(): IShapeStyle;
|
|
571
|
+
/**
|
|
572
|
+
* Returns the series' marker: on a line, scatter or radar series, what each point is drawn as.
|
|
573
|
+
*/
|
|
574
|
+
getMarker(): IChart.IMarker;
|
|
575
|
+
/**
|
|
576
|
+
* Returns the series' data labels.
|
|
577
|
+
*/
|
|
578
|
+
getDataLabels(): IChart.IDataLabels;
|
|
579
|
+
/**
|
|
580
|
+
* Returns the series' trendlines, in the order the legend lists them.
|
|
581
|
+
*
|
|
582
|
+
* @remarks
|
|
583
|
+
* A trendline is named by its place in the series: after one before it is deleted, a trendline
|
|
584
|
+
* held from earlier names the one that took its place, as in Office Scripts.
|
|
585
|
+
*/
|
|
586
|
+
getTrendlines(): readonly IChart.ITrendline[];
|
|
587
|
+
/** Returns the series' trendline at `index`, from 0, or `null` where it has none there. */
|
|
588
|
+
getChartTrendline(index: number): IChart.ITrendline | null;
|
|
589
|
+
/**
|
|
590
|
+
* Adds a trendline to the series, as Excel adds one: a dotted 1.5 pt line in the series' color,
|
|
591
|
+
* with no label. A polynomial is of order 2 and a moving average of period 2 until set.
|
|
592
|
+
*
|
|
593
|
+
* @param type The fit; `linear` by default.
|
|
594
|
+
* @throws ExpectedError on a series Excel draws no trendline for: a pie, doughnut, radar,
|
|
595
|
+
* surface, 3-D or stacked series, or a 2016 chart's.
|
|
596
|
+
*/
|
|
597
|
+
addChartTrendline(type?: IChart.TrendlineType, options?: ITransaction.OperationOptions): IChart.ITrendline;
|
|
598
|
+
/**
|
|
599
|
+
* Returns the error bars of the series' x values: a scatter's or bubble's only. Their setters
|
|
600
|
+
* throw `ExpectedError` on another series.
|
|
601
|
+
*/
|
|
602
|
+
getXErrorBars(): IChart.IErrorBars;
|
|
603
|
+
/** Returns the error bars of the series' values: along the value axis. */
|
|
604
|
+
getYErrorBars(): IChart.IErrorBars;
|
|
605
|
+
/**
|
|
606
|
+
* Returns the up/down bars of the series' group: a line or stock chart's. Their setters throw
|
|
607
|
+
* `ExpectedError` on another series.
|
|
608
|
+
*/
|
|
609
|
+
getUpDownBars(): IChart.IUpDownBars;
|
|
610
|
+
/**
|
|
611
|
+
* Returns the high-low lines of the series' group: a line or stock chart's. Their setters throw
|
|
612
|
+
* `ExpectedError` on another series.
|
|
613
|
+
*/
|
|
614
|
+
getHiLoLines(): IChart.ILines;
|
|
615
|
+
/**
|
|
616
|
+
* Returns the drop lines of the series' group: a line, area or stock chart's. Their setters throw
|
|
617
|
+
* `ExpectedError` on another series.
|
|
618
|
+
*/
|
|
619
|
+
getDropLines(): IChart.ILines;
|
|
620
|
+
/**
|
|
621
|
+
* Returns the series lines of the series' group: stacked or 100% stacked bars', or a pie of
|
|
622
|
+
* pie's. Their setters throw `ExpectedError` on another series.
|
|
623
|
+
*/
|
|
624
|
+
getSeriesLines(): IChart.ILines;
|
|
625
|
+
/**
|
|
626
|
+
* Returns the gap between clusters of bars, as a percentage of a bar's width; on a line or stock
|
|
627
|
+
* series, the gap between its group's up/down bars; on a pie of pie or bar of pie, the gap between
|
|
628
|
+
* its two plots, as a percentage of the second plot's size. `null` for another series, and for a
|
|
629
|
+
* line or stock series whose group shows no up/down bars.
|
|
630
|
+
*
|
|
631
|
+
* @remarks
|
|
632
|
+
* Every bar of the series' group shares it: setting it sets the group's.
|
|
633
|
+
*/
|
|
634
|
+
getGapWidth(): number | null;
|
|
635
|
+
/**
|
|
636
|
+
* Sets the gap between clusters of bars, 0 to 500, for the series' whole group; on a line or
|
|
637
|
+
* stock series, the gap between its group's up/down bars; on a pie of pie or bar of pie, the gap
|
|
638
|
+
* between its plots.
|
|
639
|
+
*
|
|
640
|
+
* @throws ExpectedError on a series that is not a bar or an of-pie, and on a line or stock series
|
|
641
|
+
* whose group shows no up/down bars (see {@link IChart.IUpDownBars.setGapWidth}).
|
|
642
|
+
*/
|
|
643
|
+
setGapWidth(gapWidth: number, options?: ITransaction.OperationOptions): this;
|
|
644
|
+
/**
|
|
645
|
+
* Returns how far bars of one cluster overlap, -100 to 100 percent of a bar's width, or `null`
|
|
646
|
+
* for a series that is not a bar.
|
|
647
|
+
*/
|
|
648
|
+
getOverlap(): number | null;
|
|
649
|
+
/**
|
|
650
|
+
* Sets how far bars of one cluster overlap, for the series' whole group.
|
|
651
|
+
*/
|
|
652
|
+
setOverlap(overlap: number, options?: ITransaction.OperationOptions): this;
|
|
653
|
+
/**
|
|
654
|
+
* Returns the size of a bubble chart's largest bubble, 0 to 300 percent of Excel's default, or
|
|
655
|
+
* `null` for a series that is not a bubble's.
|
|
656
|
+
*/
|
|
657
|
+
getBubbleScale(): number | null;
|
|
658
|
+
/**
|
|
659
|
+
* Sets the size of a bubble chart's largest bubble, 0 to 300 percent of Excel's default, for the
|
|
660
|
+
* series' whole group. The bubbles pad the axes in proportion.
|
|
661
|
+
*
|
|
662
|
+
* @throws ExpectedError on a series that is not a bubble's, and for a scale outside that.
|
|
663
|
+
*/
|
|
664
|
+
setBubbleScale(bubbleScale: number, options?: ITransaction.OperationOptions): this;
|
|
665
|
+
/**
|
|
666
|
+
* Returns whether a bubble chart draws a bubble for a negative size, as large as its magnitude, or
|
|
667
|
+
* `null` for a series that is not a bubble's.
|
|
668
|
+
*/
|
|
669
|
+
getShowNegativeBubbles(): boolean | null;
|
|
670
|
+
/**
|
|
671
|
+
* Sets whether a bubble chart draws a bubble for a negative size, for the series' whole group.
|
|
672
|
+
*
|
|
673
|
+
* @throws ExpectedError on a series that is not a bubble's.
|
|
674
|
+
*/
|
|
675
|
+
setShowNegativeBubbles(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
676
|
+
/**
|
|
677
|
+
* Returns whether a bubble's size is its area's or its width's, or `null` for a series that is not
|
|
678
|
+
* a bubble's.
|
|
679
|
+
*/
|
|
680
|
+
getBubbleSizeRepresents(): IChart.BubbleSizeRepresents | null;
|
|
681
|
+
/**
|
|
682
|
+
* Sets whether a bubble's size is its area's or its width's, for the series' whole group.
|
|
683
|
+
*
|
|
684
|
+
* @throws ExpectedError on a series that is not a bubble's.
|
|
685
|
+
*/
|
|
686
|
+
setBubbleSizeRepresents(represents: IChart.BubbleSizeRepresents, options?: ITransaction.OperationOptions): this;
|
|
687
|
+
/**
|
|
688
|
+
* Returns how a pie of pie or bar of pie chooses the points of its second plot, or `null` for
|
|
689
|
+
* another series. Excel's automatic split, the last third of the points, reads as by position.
|
|
690
|
+
*/
|
|
691
|
+
getSplitType(): IChart.SplitType | null;
|
|
692
|
+
/**
|
|
693
|
+
* Sets how a pie of pie or bar of pie chooses the points of its second plot. As in Excel, a split
|
|
694
|
+
* by value starts from a value of 1, and one by position or by hand from the points the second
|
|
695
|
+
* plot has now.
|
|
696
|
+
*
|
|
697
|
+
* @throws ExpectedError on a series that is not a pie of pie or bar of pie.
|
|
698
|
+
*/
|
|
699
|
+
setSplitType(splitType: IChart.SplitType, options?: ITransaction.OperationOptions): this;
|
|
700
|
+
/**
|
|
701
|
+
* Returns what a pie of pie or bar of pie splits its points by: how many of the last go to the
|
|
702
|
+
* second plot, or the value or percentage of the total below which they do. `null` for a split by
|
|
703
|
+
* hand, and for another series.
|
|
704
|
+
*/
|
|
705
|
+
getSplitValue(): number | null;
|
|
706
|
+
/**
|
|
707
|
+
* Sets what a pie of pie or bar of pie splits its points by; on Excel's automatic split, it
|
|
708
|
+
* becomes a split by position.
|
|
709
|
+
*
|
|
710
|
+
* @throws ExpectedError on a series that is not a pie of pie or bar of pie, on a split by hand,
|
|
711
|
+
* and for a negative value.
|
|
712
|
+
*/
|
|
713
|
+
setSplitValue(splitValue: number, options?: ITransaction.OperationOptions): this;
|
|
714
|
+
/**
|
|
715
|
+
* Returns the size of a pie of pie's or bar of pie's second plot, as a percentage of the first
|
|
716
|
+
* pie's, or `null` for another series.
|
|
717
|
+
*/
|
|
718
|
+
getSecondPlotSize(): number | null;
|
|
719
|
+
/**
|
|
720
|
+
* Sets the size of a pie of pie's or bar of pie's second plot, 5 to 200 percent of the first pie's.
|
|
721
|
+
*
|
|
722
|
+
* @throws ExpectedError on a series that is not a pie of pie or bar of pie, and for a size outside that.
|
|
723
|
+
*/
|
|
724
|
+
setSecondPlotSize(secondPlotSize: number, options?: ITransaction.OperationOptions): this;
|
|
725
|
+
/**
|
|
726
|
+
* Returns the indexes of the points in a pie of pie's or bar of pie's second plot, whatever chose
|
|
727
|
+
* them; empty for another series.
|
|
728
|
+
*
|
|
729
|
+
* @remarks
|
|
730
|
+
* VBA's `Point.SecondaryPlot`, for every point at once.
|
|
731
|
+
*/
|
|
732
|
+
getSecondPlotPoints(): number[];
|
|
733
|
+
/**
|
|
734
|
+
* Puts these points, by index, in a pie of pie's or bar of pie's second plot and the others in
|
|
735
|
+
* the first: a split by hand.
|
|
736
|
+
*
|
|
737
|
+
* @throws ExpectedError on a series that is not a pie of pie or bar of pie, and for an index that
|
|
738
|
+
* is not a point's.
|
|
739
|
+
*/
|
|
740
|
+
setSecondPlotPoints(points: readonly number[], options?: ITransaction.OperationOptions): this;
|
|
741
|
+
/**
|
|
742
|
+
* Returns the series as Excel's `SERIES` formula: `=SERIES(name, categories, values, order)`,
|
|
743
|
+
* a bubble's with its sizes fifth. Each part is a reference, a literal (`"Total"`, `{1,2,3}`),
|
|
744
|
+
* or empty.
|
|
745
|
+
*/
|
|
746
|
+
getFormula(): string;
|
|
747
|
+
/**
|
|
748
|
+
* Sets the series from a `SERIES` formula (VBA's `Series.Formula`): its name, categories,
|
|
749
|
+
* values, place in the plot order (from 1) and, for a bubble, its sizes.
|
|
750
|
+
*
|
|
751
|
+
* @throws ExpectedError for text that is not a `SERIES` formula.
|
|
752
|
+
*/
|
|
753
|
+
setFormula(formula: string, options?: ITransaction.OperationOptions): this;
|
|
754
|
+
/**
|
|
755
|
+
* Returns one dimension of the series as drawn, each point as text (Office Scripts'
|
|
756
|
+
* `getDimensionValues`): the categories, the values, a scatter's x or y values, or a bubble's
|
|
757
|
+
* sizes.
|
|
758
|
+
*/
|
|
759
|
+
getDimensionValues(dimension: IChart.SeriesDimension): string[];
|
|
760
|
+
/** Returns the series' place in the plot order, from 0. */
|
|
761
|
+
getPlotOrder(): number;
|
|
762
|
+
/**
|
|
763
|
+
* Moves the series to a place in the plot order, from 0: the order it is listed, stacked and
|
|
764
|
+
* drawn in. Its group's series are relisted in that order.
|
|
765
|
+
*/
|
|
766
|
+
setPlotOrder(plotOrder: number, options?: ITransaction.OperationOptions): this;
|
|
767
|
+
/** Returns whether a line or scatter series is drawn as a curve through its points. */
|
|
768
|
+
getSmooth(): boolean;
|
|
769
|
+
/**
|
|
770
|
+
* Sets whether a line or scatter series is drawn as a curve.
|
|
771
|
+
*
|
|
772
|
+
* @throws ExpectedError on a series that is not a line's or scatter's, as Excel refuses it.
|
|
773
|
+
*/
|
|
774
|
+
setSmooth(smooth: boolean, options?: ITransaction.OperationOptions): this;
|
|
775
|
+
/** Returns whether a bar's or bubble's negative points are drawn in the inverse of its fill. */
|
|
776
|
+
getInvertIfNegative(): boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Sets whether a bar's or bubble's negative points are drawn in the inverse of its fill.
|
|
779
|
+
*
|
|
780
|
+
* @throws ExpectedError on a series that is not a bar's or bubble's, as Excel refuses it.
|
|
781
|
+
*/
|
|
782
|
+
setInvertIfNegative(invert: boolean, options?: ITransaction.OperationOptions): this;
|
|
783
|
+
/** Returns how far a pie's or doughnut's slices are pulled out, as a percentage of the radius; 0 for not at all. */
|
|
784
|
+
getExplosion(): number;
|
|
785
|
+
/**
|
|
786
|
+
* Pulls a pie's or doughnut's slices out by a percentage of the radius; 0 puts them back.
|
|
787
|
+
*
|
|
788
|
+
* @throws ExpectedError on a series that is not a pie's or doughnut's, as Excel refuses it.
|
|
789
|
+
*/
|
|
790
|
+
setExplosion(explosion: number, options?: ITransaction.OperationOptions): this;
|
|
791
|
+
/** Returns whether the series' group colors each point differently, as a pie does. */
|
|
792
|
+
getVaryByCategories(): boolean;
|
|
793
|
+
/**
|
|
794
|
+
* Sets whether the series' group colors each point differently. A single series given it takes a
|
|
795
|
+
* point per value in the chart's colors, as Excel does; a pie denied it is drawn in one color.
|
|
796
|
+
*/
|
|
797
|
+
setVaryByCategories(vary: boolean, options?: ITransaction.OperationOptions): this;
|
|
798
|
+
/**
|
|
799
|
+
* Returns the series' points, one per value, each with what it states for itself: its fill,
|
|
800
|
+
* line, marker, explosion and label.
|
|
801
|
+
*/
|
|
802
|
+
getPoints(): readonly IChart.IPoint[];
|
|
803
|
+
/** Removes the series from the chart, and its group when it was the group's last. */
|
|
804
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
805
|
+
/**
|
|
806
|
+
* Sets several properties of the series at once, as one step to undo.
|
|
807
|
+
*/
|
|
808
|
+
update(update: IChart.ISeries.Update, options?: ITransaction.OperationOptions): this;
|
|
809
|
+
/** For runtime type checking. */
|
|
810
|
+
readonly isISeries: true;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* {@inheritDoc IChart.ISeries}
|
|
814
|
+
* @see
|
|
815
|
+
* ### **Interface**
|
|
816
|
+
*
|
|
817
|
+
* {@link IChart.ISeries}
|
|
818
|
+
*/
|
|
819
|
+
namespace ISeries {
|
|
820
|
+
/** What {@link IChart.ISeries.update} sets; each field as its setter takes it. */
|
|
821
|
+
interface Update {
|
|
822
|
+
name?: string | ICellRange | null;
|
|
823
|
+
values?: ICellRange | string;
|
|
824
|
+
xAxisValues?: ICellRange | string | null;
|
|
825
|
+
bubbleSizes?: ICellRange | string;
|
|
826
|
+
chartType?: IChart.Type | string;
|
|
827
|
+
axisGroup?: IChart.AxisGroup;
|
|
828
|
+
style?: IShapeStyle.Update;
|
|
829
|
+
marker?: IChart.IMarker.Update;
|
|
830
|
+
dataLabels?: IChart.IDataLabels.Update;
|
|
831
|
+
gapWidth?: number;
|
|
832
|
+
overlap?: number;
|
|
833
|
+
bubbleScale?: number;
|
|
834
|
+
showNegativeBubbles?: boolean;
|
|
835
|
+
bubbleSizeRepresents?: IChart.BubbleSizeRepresents;
|
|
836
|
+
/** Set before `splitValue`, as Excel's two writes are. */
|
|
837
|
+
splitType?: IChart.SplitType;
|
|
838
|
+
splitValue?: number;
|
|
839
|
+
secondPlotSize?: number;
|
|
840
|
+
secondPlotPoints?: readonly number[];
|
|
841
|
+
formula?: string;
|
|
842
|
+
plotOrder?: number;
|
|
843
|
+
smooth?: boolean;
|
|
844
|
+
invertIfNegative?: boolean;
|
|
845
|
+
explosion?: number;
|
|
846
|
+
varyByCategories?: boolean;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
/** One dimension of a series (Office Scripts' `ChartSeriesDimension`). */
|
|
850
|
+
type SeriesDimension = 'categories' | 'values' | 'xvalues' | 'yvalues' | 'bubbleSizes';
|
|
851
|
+
/**
|
|
852
|
+
* One point of a series: what it states for itself, over the series (VBA's `Point`, Office
|
|
853
|
+
* Scripts' `ChartPoint`).
|
|
854
|
+
*/
|
|
855
|
+
interface IPoint extends IChart.IElement {
|
|
856
|
+
/** Returns the point's index in its series, from 0. */
|
|
857
|
+
getIndex(): number;
|
|
858
|
+
/**
|
|
859
|
+
* Returns what the point is drawn with: a bar's or slice's fill and line; on a line series, its
|
|
860
|
+
* marker's fill and the line and outline at the point. Reads resolve to the series' own.
|
|
861
|
+
*/
|
|
862
|
+
getStyle(): IShapeStyle;
|
|
863
|
+
/** Returns the point's marker, over the series' marker. */
|
|
864
|
+
getMarker(): IChart.IMarker;
|
|
865
|
+
/** Returns how far a slice is pulled out, as a percentage of the radius. */
|
|
866
|
+
getExplosion(): number;
|
|
867
|
+
/** Pulls a slice out by a percentage of the radius; 0 puts it back. @throws ExpectedError off a pie or doughnut. */
|
|
868
|
+
setExplosion(explosion: number, options?: ITransaction.OperationOptions): this;
|
|
869
|
+
/** Returns whether a negative bar is drawn in the inverse of its fill, over the series. */
|
|
870
|
+
getInvertIfNegative(): boolean;
|
|
871
|
+
/** Sets whether this bar is drawn in the inverse of its fill when negative. @throws ExpectedError off a bar. */
|
|
872
|
+
setInvertIfNegative(invert: boolean, options?: ITransaction.OperationOptions): this;
|
|
873
|
+
/**
|
|
874
|
+
* Returns whether a waterfall's point is a total: its bar runs from zero to its value, which the
|
|
875
|
+
* points after it step from, rather than from the running total before it (VBA's `IsTotal`).
|
|
876
|
+
* `false` off a waterfall.
|
|
877
|
+
*/
|
|
878
|
+
getIsTotal(): boolean;
|
|
879
|
+
/** Makes a waterfall's point a total, or a step again. @throws ExpectedError off a waterfall. */
|
|
880
|
+
setIsTotal(total: boolean, options?: ITransaction.OperationOptions): this;
|
|
881
|
+
/** Returns the point's label. */
|
|
882
|
+
getDataLabel(): IChart.IDataLabel;
|
|
883
|
+
/** Returns whether the point's label is shown. */
|
|
884
|
+
getHasDataLabel(): boolean;
|
|
885
|
+
/** Shows the point's label with its value, or hides it. */
|
|
886
|
+
setHasDataLabel(has: boolean, options?: ITransaction.OperationOptions): this;
|
|
887
|
+
/** Sets several properties of the point at once, as one step to undo. */
|
|
888
|
+
update(update: IChart.IPoint.Update, options?: ITransaction.OperationOptions): this;
|
|
889
|
+
/** For runtime type checking. */
|
|
890
|
+
readonly isIPoint: true;
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* {@inheritDoc IChart.IPoint}
|
|
894
|
+
* @see
|
|
895
|
+
* ### **Interface**
|
|
896
|
+
*
|
|
897
|
+
* {@link IChart.IPoint}
|
|
898
|
+
*/
|
|
899
|
+
namespace IPoint {
|
|
900
|
+
/** What {@link IChart.IPoint.update} sets; each field as its setter takes it. */
|
|
901
|
+
interface Update {
|
|
902
|
+
style?: IShapeStyle.Update;
|
|
903
|
+
marker?: IChart.IMarker.Update;
|
|
904
|
+
explosion?: number;
|
|
905
|
+
invertIfNegative?: boolean;
|
|
906
|
+
isTotal?: boolean;
|
|
907
|
+
hasDataLabel?: boolean;
|
|
908
|
+
dataLabel?: IChart.IDataLabel.Update;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
/** The label of one point, over its series' labels. */
|
|
912
|
+
interface IDataLabel extends IChart.IElement {
|
|
913
|
+
/** Returns whether the label is shown. */
|
|
914
|
+
getVisible(): boolean;
|
|
915
|
+
/** Shows the label with its value, or hides it. */
|
|
916
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
917
|
+
/** Returns the label's own text, or `null` when it shows what its flags say. */
|
|
918
|
+
getText(): string | null;
|
|
919
|
+
/** Writes text into the label; `null` hands it back to its flags. */
|
|
920
|
+
setText(text: string | null, options?: ITransaction.OperationOptions): this;
|
|
921
|
+
/** Returns where the label sits, over the series' labels. */
|
|
922
|
+
getPosition(): IChart.DataLabelPosition;
|
|
923
|
+
/** Sets where the label sits. */
|
|
924
|
+
setPosition(position: IChart.DataLabelPosition, options?: ITransaction.OperationOptions): this;
|
|
925
|
+
/** Returns whether the label shows its point's value. */
|
|
926
|
+
getShowValue(): boolean;
|
|
927
|
+
setShowValue(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
928
|
+
/** Returns whether the label shows its point's category. */
|
|
929
|
+
getShowCategoryName(): boolean;
|
|
930
|
+
setShowCategoryName(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
931
|
+
/** Returns whether the label shows the series' name. */
|
|
932
|
+
getShowSeriesName(): boolean;
|
|
933
|
+
setShowSeriesName(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
934
|
+
/** Returns whether the label shows its point's share of the whole. */
|
|
935
|
+
getShowPercentage(): boolean;
|
|
936
|
+
setShowPercentage(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
937
|
+
/** Returns whether the label shows the series' legend key. */
|
|
938
|
+
getShowLegendKey(): boolean;
|
|
939
|
+
setShowLegendKey(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
940
|
+
/** Returns the label's number format, or `null` when it takes the values'. */
|
|
941
|
+
getNumberFormat(): string | null;
|
|
942
|
+
/** Sets the label's number format; `null` for the values' own. */
|
|
943
|
+
setNumberFormat(formatCode: string | null, options?: ITransaction.OperationOptions): this;
|
|
944
|
+
/** Returns what the label is drawn with: its fill, border and font, over the series' labels'. */
|
|
945
|
+
getStyle(): ITextBoxStyle;
|
|
946
|
+
/** Sets several properties of the label at once, as one step to undo. */
|
|
947
|
+
update(update: IChart.IDataLabel.Update, options?: ITransaction.OperationOptions): this;
|
|
948
|
+
/** For runtime type checking. */
|
|
949
|
+
readonly isIDataLabel: true;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* {@inheritDoc IChart.IDataLabel}
|
|
953
|
+
* @see
|
|
954
|
+
* ### **Interface**
|
|
955
|
+
*
|
|
956
|
+
* {@link IChart.IDataLabel}
|
|
957
|
+
*/
|
|
958
|
+
namespace IDataLabel {
|
|
959
|
+
/** What {@link IChart.IDataLabel.update} sets; each field as its setter takes it. */
|
|
960
|
+
interface Update {
|
|
961
|
+
visible?: boolean;
|
|
962
|
+
text?: string | null;
|
|
963
|
+
position?: IChart.DataLabelPosition;
|
|
964
|
+
showValue?: boolean;
|
|
965
|
+
showCategoryName?: boolean;
|
|
966
|
+
showSeriesName?: boolean;
|
|
967
|
+
showPercentage?: boolean;
|
|
968
|
+
showLegendKey?: boolean;
|
|
969
|
+
numberFormat?: string | null;
|
|
970
|
+
style?: ITextBoxStyle.Update;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* A chart group: the series drawn one way against one pair of axes, and the options they share
|
|
975
|
+
* (VBA's `ChartGroup`). Office Scripts has no groups; its per-series options set the group's.
|
|
976
|
+
*/
|
|
977
|
+
interface IChartGroup extends IChart.IElement {
|
|
978
|
+
/** Returns the group's place among the chart's groups, from 0. */
|
|
979
|
+
getIndex(): number;
|
|
980
|
+
/** Returns how the group's series are drawn, by the names of {@link IChart.Type}: its first series' type. */
|
|
981
|
+
getChartType(): string;
|
|
982
|
+
/** Returns the axes the group draws against; a pie's are `'primary'`. */
|
|
983
|
+
getAxisGroup(): IChart.AxisGroup;
|
|
984
|
+
/** Returns the group's series, in plot order. */
|
|
985
|
+
getSeries(): readonly IChart.ISeries[];
|
|
986
|
+
/** Returns the gap between clusters of bars, or `null` where the group has none. */
|
|
987
|
+
getGapWidth(): number | null;
|
|
988
|
+
/** Returns how far the group's bars overlap, or `null` where it has none. */
|
|
989
|
+
getOverlap(): number | null;
|
|
990
|
+
/** Returns whether the group colors each point differently. */
|
|
991
|
+
getVaryByCategories(): boolean;
|
|
992
|
+
/** Sets whether the group colors each point differently (see {@link IChart.ISeries.setVaryByCategories}). */
|
|
993
|
+
setVaryByCategories(vary: boolean, options?: ITransaction.OperationOptions): this;
|
|
994
|
+
/** Returns the group's up/down bars: a line or stock group's (VBA's `UpBars` and `DownBars`). */
|
|
995
|
+
getUpDownBars(): IChart.IUpDownBars;
|
|
996
|
+
/** Returns the group's high-low lines: a line or stock group's. */
|
|
997
|
+
getHiLoLines(): IChart.ILines;
|
|
998
|
+
/** Returns the group's drop lines: a line, area or stock group's. */
|
|
999
|
+
getDropLines(): IChart.ILines;
|
|
1000
|
+
/** Returns the group's series lines: stacked bars' or a pie of pie's. */
|
|
1001
|
+
getSeriesLines(): IChart.ILines;
|
|
1002
|
+
/** For runtime type checking. */
|
|
1003
|
+
readonly isIChartGroup: true;
|
|
1004
|
+
}
|
|
1005
|
+
/** The plot area: where the series are drawn. Its place is the layout's; its fill and border are set here. */
|
|
1006
|
+
interface IPlotArea extends IChart.IElement {
|
|
1007
|
+
/** Returns what the plot area is drawn with: its fill and border (Office Scripts' `getFormat()`). */
|
|
1008
|
+
getStyle(): IShapeStyle;
|
|
1009
|
+
/** Returns the left of the plot area, axis labels included, in px from the chart's left; 0 without a layout. */
|
|
1010
|
+
getLeft(): number;
|
|
1011
|
+
getTop(): number;
|
|
1012
|
+
getWidth(): number;
|
|
1013
|
+
getHeight(): number;
|
|
1014
|
+
/** Returns the left of the area inside the axes, in px from the chart's left; 0 without a layout. */
|
|
1015
|
+
getInsideLeft(): number;
|
|
1016
|
+
getInsideTop(): number;
|
|
1017
|
+
getInsideWidth(): number;
|
|
1018
|
+
getInsideHeight(): number;
|
|
1019
|
+
/** Sets several properties of the plot area at once, as one step to undo. */
|
|
1020
|
+
update(update: IChart.IPlotArea.Update, options?: ITransaction.OperationOptions): this;
|
|
1021
|
+
/** For runtime type checking. */
|
|
1022
|
+
readonly isIPlotArea: true;
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* {@inheritDoc IChart.IPlotArea}
|
|
1026
|
+
* @see
|
|
1027
|
+
* ### **Interface**
|
|
1028
|
+
*
|
|
1029
|
+
* {@link IChart.IPlotArea}
|
|
1030
|
+
*/
|
|
1031
|
+
namespace IPlotArea {
|
|
1032
|
+
/** What {@link IChart.IPlotArea.update} sets. */
|
|
1033
|
+
interface Update {
|
|
1034
|
+
style?: IShapeStyle.Update;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
/** The data table: the chart's values in a table under the plot area, a row per series. */
|
|
1038
|
+
interface IDataTable extends IChart.IElement {
|
|
1039
|
+
/** Returns whether the table is shown. */
|
|
1040
|
+
getVisible(): boolean;
|
|
1041
|
+
/** Shows the table as Excel adds it (every border and the legend keys), or removes it. */
|
|
1042
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1043
|
+
/** Returns whether each row starts with the series' legend key. */
|
|
1044
|
+
getShowLegendKey(): boolean;
|
|
1045
|
+
/** Sets whether each row starts with the series' legend key, showing the table. */
|
|
1046
|
+
setShowLegendKey(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1047
|
+
/** Returns whether the rows are parted by lines. */
|
|
1048
|
+
getShowHorizontalBorder(): boolean;
|
|
1049
|
+
setShowHorizontalBorder(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1050
|
+
/** Returns whether the columns are parted by lines. */
|
|
1051
|
+
getShowVerticalBorder(): boolean;
|
|
1052
|
+
setShowVerticalBorder(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1053
|
+
/** Returns whether the table is outlined. */
|
|
1054
|
+
getShowOutlineBorder(): boolean;
|
|
1055
|
+
setShowOutlineBorder(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1056
|
+
/** Returns what the table is drawn with: its lines, a fill, and its font. */
|
|
1057
|
+
getStyle(): ITextBoxStyle;
|
|
1058
|
+
/** Sets several properties of the table at once, as one step to undo. */
|
|
1059
|
+
update(update: IChart.IDataTable.Update, options?: ITransaction.OperationOptions): this;
|
|
1060
|
+
/** For runtime type checking. */
|
|
1061
|
+
readonly isIDataTable: true;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* {@inheritDoc IChart.IDataTable}
|
|
1065
|
+
* @see
|
|
1066
|
+
* ### **Interface**
|
|
1067
|
+
*
|
|
1068
|
+
* {@link IChart.IDataTable}
|
|
1069
|
+
*/
|
|
1070
|
+
namespace IDataTable {
|
|
1071
|
+
/** What {@link IChart.IDataTable.update} sets; each field as its setter takes it. */
|
|
1072
|
+
interface Update {
|
|
1073
|
+
visible?: boolean;
|
|
1074
|
+
showLegendKey?: boolean;
|
|
1075
|
+
showHorizontalBorder?: boolean;
|
|
1076
|
+
showVerticalBorder?: boolean;
|
|
1077
|
+
showOutlineBorder?: boolean;
|
|
1078
|
+
style?: ITextBoxStyle.Update;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
/** One entry of the legend: a series', or a slice's (VBA's `LegendEntry`). */
|
|
1082
|
+
interface ILegendEntry extends IChart.IElement {
|
|
1083
|
+
/** Returns the entry's place in the legend, from 0. */
|
|
1084
|
+
getIndex(): number;
|
|
1085
|
+
/** Returns the entry's text. */
|
|
1086
|
+
getText(): string;
|
|
1087
|
+
/** Returns whether the entry is shown. */
|
|
1088
|
+
getVisible(): boolean;
|
|
1089
|
+
/** Hides the entry, or shows it again. */
|
|
1090
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1091
|
+
/**
|
|
1092
|
+
* Returns the entry's style: its font, over the legend's. An entry has no fill or line of its
|
|
1093
|
+
* own, so they read the legend's, and setting them throws.
|
|
1094
|
+
*/
|
|
1095
|
+
getStyle(): ITextBoxStyle;
|
|
1096
|
+
/** For runtime type checking. */
|
|
1097
|
+
readonly isILegendEntry: true;
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* An axis's title: a chart title that can be turned.
|
|
1101
|
+
*
|
|
1102
|
+
* @remarks
|
|
1103
|
+
* Its text is `null` when there is no title; setting its text to `null` removes it. A title shown
|
|
1104
|
+
* with no text of its own shows Excel's, `Axis Title`.
|
|
1105
|
+
*/
|
|
1106
|
+
interface IAxisTitle extends IChart.ITitle {
|
|
1107
|
+
/** Returns the text's angle in degrees counterclockwise, `'vertical'` for stacked letters, or `'auto'`. */
|
|
1108
|
+
getTextOrientation(): number | 'vertical' | 'auto';
|
|
1109
|
+
/** Turns the text: degrees counterclockwise (90 reads up), `'vertical'` for stacked letters, `'auto'` for Excel's own. */
|
|
1110
|
+
setTextOrientation(orientation: number | 'vertical' | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1111
|
+
/** Sets several properties of the title at once, as one step to undo. */
|
|
1112
|
+
update(update: IChart.IAxisTitle.Update, options?: ITransaction.OperationOptions): this;
|
|
1113
|
+
/** For runtime type checking. */
|
|
1114
|
+
readonly isIAxisTitle: true;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* {@inheritDoc IChart.IAxisTitle}
|
|
1118
|
+
* @see
|
|
1119
|
+
* ### **Interface**
|
|
1120
|
+
*
|
|
1121
|
+
* {@link IChart.IAxisTitle}
|
|
1122
|
+
*/
|
|
1123
|
+
namespace IAxisTitle {
|
|
1124
|
+
/** What {@link IChart.IAxisTitle.update} sets; each field as its setter takes it. */
|
|
1125
|
+
interface Update extends IChart.ITitle.Update {
|
|
1126
|
+
textOrientation?: number | 'vertical' | 'auto';
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
/** How an axis is scaled (Office Scripts' `ChartAxisScaleType`). */
|
|
1130
|
+
type AxisScaleType = 'linear' | 'logarithmic';
|
|
1131
|
+
/** The unit an axis's labels are shown in (Office Scripts' `ChartAxisDisplayUnit`). */
|
|
1132
|
+
type AxisDisplayUnit = 'none' | 'hundreds' | 'thousands' | 'tenThousands' | 'hundredThousands' | 'millions' | 'tenMillions' | 'hundredMillions' | 'billions' | 'trillions' | 'custom';
|
|
1133
|
+
/** Where the crossing axis crosses an axis (Office Scripts' `ChartAxisPosition`). */
|
|
1134
|
+
type AxisCrosses = 'automatic' | 'maximum' | 'minimum' | 'custom';
|
|
1135
|
+
/** An axis's tick marks (Office Scripts' `ChartAxisTickMark`). */
|
|
1136
|
+
type AxisTickMark = 'none' | 'inside' | 'outside' | 'cross';
|
|
1137
|
+
/** Where an axis's labels sit (Office Scripts' `ChartAxisTickLabelPosition`). */
|
|
1138
|
+
type AxisTickLabelPosition = 'nextToAxis' | 'high' | 'low' | 'none';
|
|
1139
|
+
/** A date axis's unit (Office Scripts' `ChartAxisTimeUnit`). */
|
|
1140
|
+
type AxisTimeUnit = 'days' | 'months' | 'years';
|
|
1141
|
+
/** What a category axis reads its categories as (Office Scripts' `ChartAxisCategoryType`). */
|
|
1142
|
+
type AxisCategoryType = 'automatic' | 'textAxis' | 'dateAxis';
|
|
1143
|
+
/**
|
|
1144
|
+
* A chart element, by the names of VBA's `MsoChartElementType` without its prefix, in lower camel
|
|
1145
|
+
* case: what {@link IChart.setElement} adds, places or removes.
|
|
1146
|
+
*/
|
|
1147
|
+
type Element = 'chartTitleNone' | 'chartTitleCenteredOverlay' | 'chartTitleAboveChart' | 'legendNone' | 'legendRight' | 'legendTop' | 'legendLeft' | 'legendBottom' | 'legendRightOverlay' | 'legendLeftOverlay' | 'dataLabelNone' | 'dataLabelShow' | 'dataLabelCenter' | 'dataLabelInsideEnd' | 'dataLabelInsideBase' | 'dataLabelOutsideEnd' | 'dataLabelLeft' | 'dataLabelRight' | 'dataLabelTop' | 'dataLabelBottom' | 'dataLabelBestFit' | 'dataLabelCallout' | 'primaryCategoryAxisTitleNone' | 'primaryCategoryAxisTitleAdjacentToAxis' | 'primaryCategoryAxisTitleBelowAxis' | 'primaryCategoryAxisTitleRotated' | 'primaryCategoryAxisTitleVertical' | 'primaryCategoryAxisTitleHorizontal' | 'primaryValueAxisTitleNone' | 'primaryValueAxisTitleAdjacentToAxis' | 'primaryValueAxisTitleBelowAxis' | 'primaryValueAxisTitleRotated' | 'primaryValueAxisTitleVertical' | 'primaryValueAxisTitleHorizontal' | 'secondaryCategoryAxisTitleNone' | 'secondaryCategoryAxisTitleAdjacentToAxis' | 'secondaryCategoryAxisTitleBelowAxis' | 'secondaryCategoryAxisTitleRotated' | 'secondaryCategoryAxisTitleVertical' | 'secondaryCategoryAxisTitleHorizontal' | 'secondaryValueAxisTitleNone' | 'secondaryValueAxisTitleAdjacentToAxis' | 'secondaryValueAxisTitleBelowAxis' | 'secondaryValueAxisTitleRotated' | 'secondaryValueAxisTitleVertical' | 'secondaryValueAxisTitleHorizontal' | 'seriesAxisTitleNone' | 'seriesAxisTitleRotated' | 'seriesAxisTitleVertical' | 'seriesAxisTitleHorizontal' | 'primaryValueGridLinesNone' | 'primaryValueGridLinesMinor' | 'primaryValueGridLinesMajor' | 'primaryValueGridLinesMinorMajor' | 'primaryCategoryGridLinesNone' | 'primaryCategoryGridLinesMinor' | 'primaryCategoryGridLinesMajor' | 'primaryCategoryGridLinesMinorMajor' | 'secondaryValueGridLinesNone' | 'secondaryValueGridLinesMinor' | 'secondaryValueGridLinesMajor' | 'secondaryValueGridLinesMinorMajor' | 'secondaryCategoryGridLinesNone' | 'secondaryCategoryGridLinesMinor' | 'secondaryCategoryGridLinesMajor' | 'secondaryCategoryGridLinesMinorMajor' | 'seriesAxisGridLinesNone' | 'seriesAxisGridLinesMinor' | 'seriesAxisGridLinesMajor' | 'seriesAxisGridLinesMinorMajor' | 'primaryCategoryAxisNone' | 'primaryCategoryAxisShow' | 'primaryCategoryAxisWithoutLabels' | 'primaryCategoryAxisReverse' | 'primaryCategoryAxisThousands' | 'primaryCategoryAxisMillions' | 'primaryCategoryAxisBillions' | 'primaryCategoryAxisLogScale' | 'primaryValueAxisNone' | 'primaryValueAxisShow' | 'primaryValueAxisThousands' | 'primaryValueAxisMillions' | 'primaryValueAxisBillions' | 'primaryValueAxisLogScale' | 'secondaryCategoryAxisNone' | 'secondaryCategoryAxisShow' | 'secondaryCategoryAxisWithoutLabels' | 'secondaryCategoryAxisReverse' | 'secondaryCategoryAxisThousands' | 'secondaryCategoryAxisMillions' | 'secondaryCategoryAxisBillions' | 'secondaryCategoryAxisLogScale' | 'secondaryValueAxisNone' | 'secondaryValueAxisShow' | 'secondaryValueAxisThousands' | 'secondaryValueAxisMillions' | 'secondaryValueAxisBillions' | 'secondaryValueAxisLogScale' | 'seriesAxisNone' | 'seriesAxisShow' | 'seriesAxisWithoutLabeling' | 'seriesAxisReverse' | 'dataTableNone' | 'dataTableShow' | 'dataTableWithLegendKeys' | 'trendlineNone' | 'trendlineAddLinear' | 'trendlineAddExponential' | 'trendlineAddLinearForecast' | 'trendlineAddTwoPeriodMovingAverage' | 'errorBarNone' | 'errorBarStandardError' | 'errorBarPercentage' | 'errorBarStandardDeviation' | 'lineNone' | 'lineDropLine' | 'lineHiLoLine' | 'lineSeriesLine' | 'lineDropHiLoLine' | 'upDownBarsNone' | 'upDownBarsShow' | 'plotAreaNone' | 'plotAreaShow' | 'chartWallNone' | 'chartWallShow' | 'chartFloorNone' | 'chartFloorShow';
|
|
1148
|
+
/** What a bubble's size is: its area's or its width's (VBA's `XlSizeRepresents`). */
|
|
1149
|
+
type BubbleSizeRepresents = 'area' | 'width';
|
|
1150
|
+
/**
|
|
1151
|
+
* How a pie of pie or bar of pie chooses the points of its second plot: the last so many, those
|
|
1152
|
+
* below a value or a percentage of the total, or those chosen by hand (Office Scripts'
|
|
1153
|
+
* `ChartSplitType`).
|
|
1154
|
+
*/
|
|
1155
|
+
type SplitType = 'splitByPosition' | 'splitByValue' | 'splitByPercentValue' | 'splitByCustomSplit';
|
|
1156
|
+
/** The primary axes, or the secondary ones a combo plots some series against. */
|
|
1157
|
+
type AxisGroup = 'primary' | 'secondary';
|
|
1158
|
+
/**
|
|
1159
|
+
* How a blank cell is plotted: not at all (a gap), as zero, or with the line drawn across it,
|
|
1160
|
+
* by Office Scripts' names (`ChartDisplayBlanksAs`).
|
|
1161
|
+
*/
|
|
1162
|
+
type DisplayBlanksAs = 'notPlotted' | 'zero' | 'interplotted';
|
|
1163
|
+
/** Where a legend sits: on a side of the chart, or in its top right corner. */
|
|
1164
|
+
type LegendPosition = 'top' | 'bottom' | 'left' | 'right' | 'corner';
|
|
1165
|
+
/** What a marker is drawn as; `'automatic'` lets the series' place in the chart choose. */
|
|
1166
|
+
type MarkerSymbol = 'automatic' | 'none' | 'square' | 'diamond' | 'triangle' | 'x' | 'star' | 'dot' | 'dash' | 'circle' | 'plus';
|
|
1167
|
+
/** Where a data label sits by its point, by Office Scripts' names (`ChartDataLabelPosition`). */
|
|
1168
|
+
type DataLabelPosition = 'center' | 'insideEnd' | 'insideBase' | 'outsideEnd' | 'left' | 'right' | 'top' | 'bottom' | 'bestFit';
|
|
1169
|
+
/**
|
|
1170
|
+
* The chart's axes.
|
|
1171
|
+
*/
|
|
1172
|
+
interface IAxes {
|
|
1173
|
+
/**
|
|
1174
|
+
* Returns the axes the chart shows, in the order the chart lists them; a hidden axis is left out.
|
|
1175
|
+
*/
|
|
1176
|
+
getItems(): readonly IChart.IAxis[];
|
|
1177
|
+
/**
|
|
1178
|
+
* Returns the axis the values are measured along, shown or hidden: a scatter's vertical one.
|
|
1179
|
+
* `null` when the chart has none on those axes.
|
|
1180
|
+
*
|
|
1181
|
+
* @param group The primary axes, by default, or the secondary ones.
|
|
1182
|
+
*/
|
|
1183
|
+
getValueAxis(group?: IChart.AxisGroup): IChart.IAxis | null;
|
|
1184
|
+
/**
|
|
1185
|
+
* Returns the axis the categories run along, shown or hidden: a scatter's horizontal one.
|
|
1186
|
+
* `null` when the chart has none on those axes.
|
|
1187
|
+
*/
|
|
1188
|
+
getCategoryAxis(group?: IChart.AxisGroup): IChart.IAxis | null;
|
|
1189
|
+
/**
|
|
1190
|
+
* Returns the series axis of a 3-D or surface chart, or `null`.
|
|
1191
|
+
*/
|
|
1192
|
+
getSeriesAxis(): IChart.IAxis | null;
|
|
1193
|
+
/**
|
|
1194
|
+
* Returns the axis of `type` on `group`'s axes, or `null`.
|
|
1195
|
+
*/
|
|
1196
|
+
getChartAxis(type: 'category' | 'value' | 'series', group?: IChart.AxisGroup): IChart.IAxis | null;
|
|
151
1197
|
}
|
|
152
1198
|
/**
|
|
153
1199
|
* One axis of a chart.
|
|
154
1200
|
*/
|
|
155
|
-
interface IAxis {
|
|
1201
|
+
interface IAxis extends IChart.IElement {
|
|
156
1202
|
/**
|
|
157
1203
|
* Returns what the axis measures: categories, values, dates, or — on a surface or 3-D chart —
|
|
158
1204
|
* the series themselves.
|
|
159
1205
|
*/
|
|
160
1206
|
getKind(): 'category' | 'value' | 'date' | 'series';
|
|
161
1207
|
/**
|
|
162
|
-
* Returns the
|
|
1208
|
+
* Returns the axes the axis belongs to.
|
|
1209
|
+
*/
|
|
1210
|
+
getAxisGroup(): IChart.AxisGroup;
|
|
1211
|
+
/**
|
|
1212
|
+
* Returns the axis's title: its text, font, fill and orientation. An axis always has one
|
|
1213
|
+
* to set, shown or not.
|
|
163
1214
|
*
|
|
164
1215
|
* @remarks
|
|
165
|
-
* Often the only place the units of a chart are stated.
|
|
1216
|
+
* Often the only place the units of a chart are stated. A formula (`=Sheet1!$B$1`) as its text
|
|
1217
|
+
* shows a cell's text.
|
|
1218
|
+
*
|
|
1219
|
+
* @example
|
|
1220
|
+
* ```ts
|
|
1221
|
+
* axis.getTitle().getText(); // 'Units', or null
|
|
1222
|
+
* axis.getTitle().setText('Units');
|
|
1223
|
+
* ```
|
|
166
1224
|
*/
|
|
167
|
-
getTitle():
|
|
1225
|
+
getTitle(): IChart.IAxisTitle;
|
|
168
1226
|
/**
|
|
169
1227
|
* Returns the number format of the axis labels, or `null` if the axis states none.
|
|
170
1228
|
*/
|
|
171
1229
|
getNumberFormat(): string | null;
|
|
1230
|
+
/**
|
|
1231
|
+
* Sets the number format of the axis labels, no longer taking the format of the cells.
|
|
1232
|
+
*/
|
|
1233
|
+
setNumberFormat(formatCode: string, options?: ITransaction.OperationOptions): this;
|
|
1234
|
+
/**
|
|
1235
|
+
* Returns whether the labels take the number format of the cells the chart plots.
|
|
1236
|
+
*/
|
|
1237
|
+
getLinkNumberFormat(): boolean;
|
|
1238
|
+
/**
|
|
1239
|
+
* Sets whether the labels take the number format of the cells the chart plots.
|
|
1240
|
+
*/
|
|
1241
|
+
setLinkNumberFormat(linked: boolean, options?: ITransaction.OperationOptions): this;
|
|
1242
|
+
/**
|
|
1243
|
+
* Returns whether the axis is shown. A hidden axis still scales its series.
|
|
1244
|
+
*/
|
|
1245
|
+
getVisible(): boolean;
|
|
1246
|
+
/**
|
|
1247
|
+
* Shows or hides the axis.
|
|
1248
|
+
*/
|
|
1249
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1250
|
+
/**
|
|
1251
|
+
* Returns the least value the axis shows: the one set, or the one the chart chose. `null` for an
|
|
1252
|
+
* axis of categories that states none.
|
|
1253
|
+
*
|
|
1254
|
+
* @remarks
|
|
1255
|
+
* An automatic value is the one the chart is drawn with at its size, as Excel's `MinimumScale`
|
|
1256
|
+
* reads.
|
|
1257
|
+
*/
|
|
1258
|
+
getMinimum(): number | null;
|
|
1259
|
+
/**
|
|
1260
|
+
* Sets the least value the axis shows, or `'auto'` to let the chart choose.
|
|
1261
|
+
*/
|
|
1262
|
+
setMinimum(value: number | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1263
|
+
/**
|
|
1264
|
+
* Returns whether the chart chooses the least value.
|
|
1265
|
+
*/
|
|
1266
|
+
isMinimumAuto(): boolean;
|
|
1267
|
+
/**
|
|
1268
|
+
* Returns the greatest value the axis shows: the one set, or the one the chart chose.
|
|
1269
|
+
*
|
|
1270
|
+
* @see {@link getMinimum}
|
|
1271
|
+
*/
|
|
1272
|
+
getMaximum(): number | null;
|
|
1273
|
+
/**
|
|
1274
|
+
* Sets the greatest value the axis shows, or `'auto'` to let the chart choose.
|
|
1275
|
+
*/
|
|
1276
|
+
setMaximum(value: number | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1277
|
+
/**
|
|
1278
|
+
* Returns whether the chart chooses the greatest value.
|
|
1279
|
+
*/
|
|
1280
|
+
isMaximumAuto(): boolean;
|
|
1281
|
+
/**
|
|
1282
|
+
* Returns the interval between the axis's labeled ticks: the one set, or the one the chart chose.
|
|
1283
|
+
*
|
|
1284
|
+
* @see {@link getMinimum}
|
|
1285
|
+
*/
|
|
1286
|
+
getMajorUnit(): number | null;
|
|
1287
|
+
/**
|
|
1288
|
+
* Sets the interval between labeled ticks, or `'auto'` to let the chart choose.
|
|
1289
|
+
*/
|
|
1290
|
+
setMajorUnit(value: number | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1291
|
+
/**
|
|
1292
|
+
* Returns whether the chart chooses the interval between labeled ticks.
|
|
1293
|
+
*/
|
|
1294
|
+
isMajorUnitAuto(): boolean;
|
|
1295
|
+
/**
|
|
1296
|
+
* Returns the lines across the plot area at the axis's labeled ticks.
|
|
1297
|
+
*/
|
|
1298
|
+
getMajorGridlines(): IChart.IGridlines;
|
|
1299
|
+
/**
|
|
1300
|
+
* Returns the lines across the plot area between the labeled ticks.
|
|
1301
|
+
*/
|
|
1302
|
+
getMinorGridlines(): IChart.IGridlines;
|
|
1303
|
+
/**
|
|
1304
|
+
* Returns whether the axis draws categories two or more levels deep a level at a time, each
|
|
1305
|
+
* outer label spanning its group. `false` for an axis of values or dates.
|
|
1306
|
+
*
|
|
1307
|
+
* @remarks
|
|
1308
|
+
* `true` by default, and on an axis whose categories have one level, where it changes nothing
|
|
1309
|
+
* drawn. Off, each category has one label of all its levels.
|
|
1310
|
+
*/
|
|
1311
|
+
getMultiLevel(): boolean;
|
|
1312
|
+
/**
|
|
1313
|
+
* Sets whether the axis draws categories two or more levels deep a level at a time. An axis of
|
|
1314
|
+
* dates keeps no such setting, and is left as it is.
|
|
1315
|
+
*
|
|
1316
|
+
* @throws ExpectedError for an axis of values.
|
|
1317
|
+
*/
|
|
1318
|
+
setMultiLevel(multiLevel: boolean, options?: ITransaction.OperationOptions): this;
|
|
1319
|
+
/**
|
|
1320
|
+
* Sets the categories of every series plotted on the axis: a range, an address, a defined name,
|
|
1321
|
+
* or an array constant (`{"Q1","Q2"}`). A range two or more columns deep gives categories that
|
|
1322
|
+
* many levels deep. Categories that are all dates make the axis a date axis, unless its type
|
|
1323
|
+
* was set.
|
|
1324
|
+
*
|
|
1325
|
+
* @throws ExpectedError for an axis of values.
|
|
1326
|
+
*/
|
|
1327
|
+
setCategoryNames(source: ICellRange | string, options?: ITransaction.OperationOptions): this;
|
|
1328
|
+
/**
|
|
1329
|
+
* Returns the interval between the axis's minor ticks: the one set, or the one the chart chose
|
|
1330
|
+
* (a fifth of the major unit, by belief). `null` for an axis of categories.
|
|
1331
|
+
*/
|
|
1332
|
+
getMinorUnit(): number | null;
|
|
1333
|
+
/** Sets the interval between minor ticks, or `'auto'` to let the chart choose. @throws ExpectedError on an axis of categories. */
|
|
1334
|
+
setMinorUnit(value: number | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1335
|
+
/** Returns whether the chart chooses the minor unit. */
|
|
1336
|
+
isMinorUnitAuto(): boolean;
|
|
1337
|
+
/** Returns whether the axis is linear or logarithmic. */
|
|
1338
|
+
getScaleType(): IChart.AxisScaleType;
|
|
1339
|
+
/** Makes the axis linear or logarithmic (base 10). @throws ExpectedError on an axis of categories. */
|
|
1340
|
+
setScaleType(scaleType: IChart.AxisScaleType, options?: ITransaction.OperationOptions): this;
|
|
1341
|
+
/** Returns a logarithmic axis's base; 10 for a linear axis. */
|
|
1342
|
+
getLogBase(): number;
|
|
1343
|
+
/** Sets the base of a logarithmic axis, making it one. @throws ExpectedError for a base of 2 or less, or on an axis of categories. */
|
|
1344
|
+
setLogBase(logBase: number, options?: ITransaction.OperationOptions): this;
|
|
1345
|
+
/** Returns the unit the axis's labels are shown in: `'thousands'`, `'custom'`, or `'none'`. */
|
|
1346
|
+
getDisplayUnit(): IChart.AxisDisplayUnit;
|
|
1347
|
+
/** Shows the labels in a unit, with Excel's label for it, or `'none'`. @throws ExpectedError on an axis of categories. */
|
|
1348
|
+
setDisplayUnit(unit: IChart.AxisDisplayUnit, options?: ITransaction.OperationOptions): this;
|
|
1349
|
+
/** Returns the divisor of a custom display unit, or the built-in unit's; 1 for none. */
|
|
1350
|
+
getCustomDisplayUnit(): number;
|
|
1351
|
+
/** Shows the labels divided by `unit`, with Excel's label. */
|
|
1352
|
+
setCustomDisplayUnit(unit: number, options?: ITransaction.OperationOptions): this;
|
|
1353
|
+
/** Returns whether the display unit's label is shown beside the axis. */
|
|
1354
|
+
getShowDisplayUnitLabel(): boolean;
|
|
1355
|
+
/** Shows or hides the display unit's label. Nothing changes on an axis with no display unit. */
|
|
1356
|
+
setShowDisplayUnitLabel(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1357
|
+
/**
|
|
1358
|
+
* Returns where the crossing axis crosses this one: automatically (at zero), at this axis's
|
|
1359
|
+
* maximum or minimum, or at a value ({@link getCrossesAt}).
|
|
1360
|
+
*/
|
|
1361
|
+
getCrosses(): IChart.AxisCrosses;
|
|
1362
|
+
/**
|
|
1363
|
+
* Sets where the crossing axis crosses this one. At the maximum, the crossing axis moves to the
|
|
1364
|
+
* far side of the plot (the top, or the right), as in Excel.
|
|
1365
|
+
*/
|
|
1366
|
+
setCrosses(crosses: IChart.AxisCrosses, options?: ITransaction.OperationOptions): this;
|
|
1367
|
+
/** Returns the value the crossing axis crosses this one at, when one is set; else `null`. */
|
|
1368
|
+
getCrossesAt(): number | null;
|
|
1369
|
+
/** Makes the crossing axis cross this one at `value` (a category's number from 1 on an axis of categories). */
|
|
1370
|
+
setCrossesAt(value: number, options?: ITransaction.OperationOptions): this;
|
|
1371
|
+
/** Returns whether the axis runs from its maximum to its minimum. */
|
|
1372
|
+
getReversePlotOrder(): boolean;
|
|
1373
|
+
/** Reverses the axis. The crossing axis moves to the other side of the plot, as in Excel. */
|
|
1374
|
+
setReversePlotOrder(reverse: boolean, options?: ITransaction.OperationOptions): this;
|
|
1375
|
+
/** Returns the axis's major tick marks. */
|
|
1376
|
+
getMajorTickMark(): IChart.AxisTickMark;
|
|
1377
|
+
setMajorTickMark(mark: IChart.AxisTickMark, options?: ITransaction.OperationOptions): this;
|
|
1378
|
+
/** Returns the axis's minor tick marks. */
|
|
1379
|
+
getMinorTickMark(): IChart.AxisTickMark;
|
|
1380
|
+
setMinorTickMark(mark: IChart.AxisTickMark, options?: ITransaction.OperationOptions): this;
|
|
1381
|
+
/** Returns where the labels sit: next to the axis, at the high or low end of the crossing axis, or nowhere. */
|
|
1382
|
+
getTickLabelPosition(): IChart.AxisTickLabelPosition;
|
|
1383
|
+
setTickLabelPosition(position: IChart.AxisTickLabelPosition, options?: ITransaction.OperationOptions): this;
|
|
1384
|
+
/**
|
|
1385
|
+
* Returns the labels' angle in degrees counterclockwise (90 reads up), `'vertical'` for stacked
|
|
1386
|
+
* letters, or `'auto'` for Excel's own.
|
|
1387
|
+
*/
|
|
1388
|
+
getTextOrientation(): number | 'vertical' | 'auto';
|
|
1389
|
+
/** Turns the labels: degrees from -90 to 90 counterclockwise, `'vertical'`, or `'auto'`. */
|
|
1390
|
+
setTextOrientation(orientation: number | 'vertical' | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1391
|
+
/** Returns what the axis is drawn with: its line (a fill does not apply) and the labels' font. */
|
|
1392
|
+
getStyle(): ITextBoxStyle;
|
|
1393
|
+
/** Returns how many categories apart the labels are, or `null` when the chart chooses. */
|
|
1394
|
+
getTickLabelSpacing(): number | null;
|
|
1395
|
+
/** Labels every n-th category; `null` lets the chart choose. @throws ExpectedError off an axis of categories. */
|
|
1396
|
+
setTickLabelSpacing(spacing: number | null, options?: ITransaction.OperationOptions): this;
|
|
1397
|
+
/** Returns how many categories apart the tick marks are, or `null` when the chart chooses. */
|
|
1398
|
+
getTickMarkSpacing(): number | null;
|
|
1399
|
+
setTickMarkSpacing(spacing: number | null, options?: ITransaction.OperationOptions): this;
|
|
1400
|
+
/** Returns a date axis's base unit: what one category spans. `null` for another axis. */
|
|
1401
|
+
getBaseTimeUnit(): IChart.AxisTimeUnit | null;
|
|
1402
|
+
/** Sets a date axis's base unit, or `'auto'` for the one its dates decide. @throws ExpectedError off a date axis. */
|
|
1403
|
+
setBaseTimeUnit(unit: IChart.AxisTimeUnit | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1404
|
+
/** Returns the unit of a date axis's major unit, or `null` for another axis. */
|
|
1405
|
+
getMajorTimeUnitScale(): IChart.AxisTimeUnit | null;
|
|
1406
|
+
/** Sets a date axis's major unit with its time unit: `setMajorUnit(2)` and `setMajorTimeUnitScale('months')` label every two months. */
|
|
1407
|
+
setMajorTimeUnitScale(unit: IChart.AxisTimeUnit, options?: ITransaction.OperationOptions): this;
|
|
1408
|
+
/** Returns the unit of a date axis's minor unit, or `null` for another axis. */
|
|
1409
|
+
getMinorTimeUnitScale(): IChart.AxisTimeUnit | null;
|
|
1410
|
+
setMinorTimeUnitScale(unit: IChart.AxisTimeUnit, options?: ITransaction.OperationOptions): this;
|
|
1411
|
+
/** Returns what a category axis reads its categories as: text, dates, or whichever the cells are. */
|
|
1412
|
+
getCategoryType(): IChart.AxisCategoryType;
|
|
1413
|
+
/** Makes a category axis read its categories as text or as dates, or as the cells decide. @throws ExpectedError on a value axis. */
|
|
1414
|
+
setCategoryType(type: IChart.AxisCategoryType, options?: ITransaction.OperationOptions): this;
|
|
1415
|
+
/**
|
|
1416
|
+
* Sets several properties of the axis at once, as one step to undo.
|
|
1417
|
+
*/
|
|
1418
|
+
update(update: IChart.IAxis.Update, options?: ITransaction.OperationOptions): this;
|
|
1419
|
+
/** For runtime type checking. */
|
|
1420
|
+
readonly isIAxis: true;
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* {@inheritDoc IChart.IAxis}
|
|
1424
|
+
* @see
|
|
1425
|
+
* ### **Interface**
|
|
1426
|
+
*
|
|
1427
|
+
* {@link IChart.IAxis}
|
|
1428
|
+
*/
|
|
1429
|
+
namespace IAxis {
|
|
1430
|
+
/** What {@link IChart.IAxis.update} sets; each field as its setter takes it. */
|
|
1431
|
+
interface Update {
|
|
1432
|
+
/** The title's properties, or its text; `null` removes it. */
|
|
1433
|
+
title?: IChart.IAxisTitle.Update | string | null;
|
|
1434
|
+
numberFormat?: string;
|
|
1435
|
+
linkNumberFormat?: boolean;
|
|
1436
|
+
visible?: boolean;
|
|
1437
|
+
minimum?: number | 'auto';
|
|
1438
|
+
maximum?: number | 'auto';
|
|
1439
|
+
majorUnit?: number | 'auto';
|
|
1440
|
+
majorGridlines?: boolean;
|
|
1441
|
+
minorGridlines?: boolean;
|
|
1442
|
+
multiLevel?: boolean;
|
|
1443
|
+
categoryNames?: ICellRange | string;
|
|
1444
|
+
minorUnit?: number | 'auto';
|
|
1445
|
+
scaleType?: IChart.AxisScaleType;
|
|
1446
|
+
logBase?: number;
|
|
1447
|
+
displayUnit?: IChart.AxisDisplayUnit;
|
|
1448
|
+
customDisplayUnit?: number;
|
|
1449
|
+
showDisplayUnitLabel?: boolean;
|
|
1450
|
+
crosses?: IChart.AxisCrosses;
|
|
1451
|
+
crossesAt?: number;
|
|
1452
|
+
reversePlotOrder?: boolean;
|
|
1453
|
+
majorTickMark?: IChart.AxisTickMark;
|
|
1454
|
+
minorTickMark?: IChart.AxisTickMark;
|
|
1455
|
+
tickLabelPosition?: IChart.AxisTickLabelPosition;
|
|
1456
|
+
textOrientation?: number | 'vertical' | 'auto';
|
|
1457
|
+
style?: ITextBoxStyle.Update;
|
|
1458
|
+
tickLabelSpacing?: number | null;
|
|
1459
|
+
tickMarkSpacing?: number | null;
|
|
1460
|
+
baseTimeUnit?: IChart.AxisTimeUnit | 'auto';
|
|
1461
|
+
majorTimeUnitScale?: IChart.AxisTimeUnit;
|
|
1462
|
+
minorTimeUnitScale?: IChart.AxisTimeUnit;
|
|
1463
|
+
categoryType?: IChart.AxisCategoryType;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Lines across the plot area at an axis's ticks.
|
|
1468
|
+
*/
|
|
1469
|
+
interface IGridlines extends IChart.IElement {
|
|
1470
|
+
/** Returns whether the lines are drawn. */
|
|
1471
|
+
getVisible(): boolean;
|
|
1472
|
+
/** Draws or removes the lines. */
|
|
1473
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1474
|
+
/**
|
|
1475
|
+
* Returns what the lines are drawn with; only its line applies. Setting it shows the lines.
|
|
1476
|
+
*/
|
|
1477
|
+
getStyle(): IShapeStyle;
|
|
1478
|
+
/** For runtime type checking. */
|
|
1479
|
+
readonly isIGridlines: true;
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* A title: the chart's ({@link IChart.getTitle}), or an axis's ({@link IChart.IAxisTitle}).
|
|
1483
|
+
*/
|
|
1484
|
+
interface ITitle extends IChart.IElement {
|
|
1485
|
+
/**
|
|
1486
|
+
* Returns the text the title shows, or `null` when it is not shown. A chart title that states
|
|
1487
|
+
* no text of its own shows the name of a chart's only series, else `Chart Title`.
|
|
1488
|
+
*/
|
|
1489
|
+
getText(): string | null;
|
|
1490
|
+
/**
|
|
1491
|
+
* Sets the title's text and shows it. A formula (`=Sheet1!$A$1`) shows a cell's text. `null`
|
|
1492
|
+
* hands a chart title back to the automatic text, and removes an axis title.
|
|
1493
|
+
*/
|
|
1494
|
+
setText(text: string | null, options?: ITransaction.OperationOptions): this;
|
|
1495
|
+
/** Returns whether the title is shown. */
|
|
1496
|
+
getVisible(): boolean;
|
|
1497
|
+
/** Shows or removes the title. */
|
|
1498
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1499
|
+
/** Returns whether the title is drawn over the plot area rather than taking room above it. */
|
|
1500
|
+
getOverlay(): boolean;
|
|
1501
|
+
/** Sets whether the title is drawn over the plot area, and shows it. */
|
|
1502
|
+
setOverlay(overlay: boolean, options?: ITransaction.OperationOptions): this;
|
|
1503
|
+
/** Returns what the title is drawn with: its fill, border and font. Setting it shows the title. */
|
|
1504
|
+
getStyle(): ITextBoxStyle;
|
|
1505
|
+
/** Sets several properties of the title at once, as one step to undo. */
|
|
1506
|
+
update(update: IChart.ITitle.Update, options?: ITransaction.OperationOptions): this;
|
|
1507
|
+
/** For runtime type checking. */
|
|
1508
|
+
readonly isITitle: true;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* {@inheritDoc IChart.ITitle}
|
|
1512
|
+
* @see
|
|
1513
|
+
* ### **Interface**
|
|
1514
|
+
*
|
|
1515
|
+
* {@link IChart.ITitle}
|
|
1516
|
+
*/
|
|
1517
|
+
namespace ITitle {
|
|
1518
|
+
/** What {@link IChart.ITitle.update} sets; each field as its setter takes it. */
|
|
1519
|
+
interface Update {
|
|
1520
|
+
text?: string | null;
|
|
1521
|
+
visible?: boolean;
|
|
1522
|
+
overlay?: boolean;
|
|
1523
|
+
style?: ITextBoxStyle.Update;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* The chart's legend.
|
|
1528
|
+
*/
|
|
1529
|
+
interface ILegend extends IChart.IElement {
|
|
1530
|
+
/** Returns whether the legend is shown. */
|
|
1531
|
+
getVisible(): boolean;
|
|
1532
|
+
/** Shows or removes the legend. A legend shown anew is at the right, as in Excel. */
|
|
1533
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1534
|
+
/** Returns where the legend sits. */
|
|
1535
|
+
getPosition(): IChart.LegendPosition;
|
|
1536
|
+
/** Moves the legend, and shows it. */
|
|
1537
|
+
setPosition(position: IChart.LegendPosition, options?: ITransaction.OperationOptions): this;
|
|
1538
|
+
/** Returns whether the legend is drawn over the plot area rather than taking room beside it. */
|
|
1539
|
+
getOverlay(): boolean;
|
|
1540
|
+
/** Sets whether the legend is drawn over the plot area, and shows it. */
|
|
1541
|
+
setOverlay(overlay: boolean, options?: ITransaction.OperationOptions): this;
|
|
1542
|
+
/** Returns what the legend is drawn with: its fill, border and font. Setting it shows the legend. */
|
|
1543
|
+
getStyle(): ITextBoxStyle;
|
|
1544
|
+
/**
|
|
1545
|
+
* Returns the legend's entries, as drawn: one per series, or per slice of a single pie; a
|
|
1546
|
+
* hidden entry is listed too.
|
|
1547
|
+
*/
|
|
1548
|
+
getLegendEntries(): readonly IChart.ILegendEntry[];
|
|
1549
|
+
/** Sets several properties of the legend at once, as one step to undo. */
|
|
1550
|
+
update(update: IChart.ILegend.Update, options?: ITransaction.OperationOptions): this;
|
|
1551
|
+
/** For runtime type checking. */
|
|
1552
|
+
readonly isILegend: true;
|
|
1553
|
+
}
|
|
1554
|
+
/**
|
|
1555
|
+
* {@inheritDoc IChart.ILegend}
|
|
1556
|
+
* @see
|
|
1557
|
+
* ### **Interface**
|
|
1558
|
+
*
|
|
1559
|
+
* {@link IChart.ILegend}
|
|
1560
|
+
*/
|
|
1561
|
+
namespace ILegend {
|
|
1562
|
+
/** What {@link IChart.ILegend.update} sets; each field as its setter takes it. */
|
|
1563
|
+
interface Update {
|
|
1564
|
+
visible?: boolean;
|
|
1565
|
+
position?: IChart.LegendPosition;
|
|
1566
|
+
overlay?: boolean;
|
|
1567
|
+
style?: ITextBoxStyle.Update;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* What each point of a line, scatter or radar series is drawn as.
|
|
1572
|
+
*/
|
|
1573
|
+
interface IMarker extends IChart.IElement {
|
|
1574
|
+
/** Returns the marker's symbol; `'none'` when the series draws none. */
|
|
1575
|
+
getSymbol(): IChart.MarkerSymbol;
|
|
1576
|
+
/**
|
|
1577
|
+
* Sets the marker's symbol. A line series given one shows markers; given `'none'`, it shows none.
|
|
1578
|
+
*/
|
|
1579
|
+
setSymbol(symbol: IChart.MarkerSymbol, options?: ITransaction.OperationOptions): this;
|
|
1580
|
+
/** Returns the marker's size in points, 2 to 72. */
|
|
1581
|
+
getSize(): number;
|
|
1582
|
+
/** Sets the marker's size in points, 2 to 72. */
|
|
1583
|
+
setSize(size: number, options?: ITransaction.OperationOptions): this;
|
|
1584
|
+
/** Returns what the marker is drawn with: its fill, and its outline as the line. */
|
|
1585
|
+
getStyle(): IShapeStyle;
|
|
1586
|
+
/** Sets several properties of the marker at once, as one step to undo. */
|
|
1587
|
+
update(update: IChart.IMarker.Update, options?: ITransaction.OperationOptions): this;
|
|
1588
|
+
/** For runtime type checking. */
|
|
1589
|
+
readonly isIMarker: true;
|
|
1590
|
+
}
|
|
1591
|
+
/**
|
|
1592
|
+
* {@inheritDoc IChart.IMarker}
|
|
1593
|
+
* @see
|
|
1594
|
+
* ### **Interface**
|
|
1595
|
+
*
|
|
1596
|
+
* {@link IChart.IMarker}
|
|
1597
|
+
*/
|
|
1598
|
+
namespace IMarker {
|
|
1599
|
+
/** What {@link IChart.IMarker.update} sets; each field as its setter takes it. */
|
|
1600
|
+
interface Update {
|
|
1601
|
+
symbol?: IChart.MarkerSymbol;
|
|
1602
|
+
size?: number;
|
|
1603
|
+
style?: IShapeStyle.Update;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
/**
|
|
1607
|
+
* The labels of a series' points.
|
|
1608
|
+
*/
|
|
1609
|
+
interface IDataLabels extends IChart.IElement {
|
|
1610
|
+
/** Returns whether the series' points are labeled. */
|
|
1611
|
+
getVisible(): boolean;
|
|
1612
|
+
/**
|
|
1613
|
+
* Labels the series' points with their values, as Excel's "Data Labels" does, or removes the
|
|
1614
|
+
* labels.
|
|
1615
|
+
*/
|
|
1616
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1617
|
+
/** Returns whether a label shows its point's value. */
|
|
1618
|
+
getShowValue(): boolean;
|
|
1619
|
+
/** Sets whether a label shows its point's value; showing it shows the labels. */
|
|
1620
|
+
setShowValue(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1621
|
+
/** Returns whether a label shows its point's category. */
|
|
1622
|
+
getShowCategoryName(): boolean;
|
|
1623
|
+
/** Sets whether a label shows its point's category. */
|
|
1624
|
+
setShowCategoryName(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1625
|
+
/** Returns whether a label shows the series' name. */
|
|
1626
|
+
getShowSeriesName(): boolean;
|
|
1627
|
+
/** Sets whether a label shows the series' name. */
|
|
1628
|
+
setShowSeriesName(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1629
|
+
/** Returns whether a label shows its point's share of the whole. */
|
|
1630
|
+
getShowPercentage(): boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* Sets whether a label shows its point's share of the whole.
|
|
1633
|
+
*
|
|
1634
|
+
* @throws ExpectedError for a series that is not a pie or doughnut, as in Excel.
|
|
1635
|
+
*/
|
|
1636
|
+
setShowPercentage(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1637
|
+
/**
|
|
1638
|
+
* Returns where the labels sit: the one set, or the type's own (outside the end of a clustered
|
|
1639
|
+
* bar, the center of a stacked bar or an area, right of a line's or a scatter's point).
|
|
1640
|
+
*/
|
|
1641
|
+
getPosition(): IChart.DataLabelPosition;
|
|
1642
|
+
/** Sets where the labels sit. */
|
|
1643
|
+
setPosition(position: IChart.DataLabelPosition, options?: ITransaction.OperationOptions): this;
|
|
1644
|
+
/** Returns what separates the parts of a label. */
|
|
1645
|
+
getSeparator(): string;
|
|
1646
|
+
/** Sets what separates the parts of a label. */
|
|
1647
|
+
setSeparator(separator: string, options?: ITransaction.OperationOptions): this;
|
|
1648
|
+
/** Returns the labels' number format, or `null` when they take the values'. */
|
|
1649
|
+
getNumberFormat(): string | null;
|
|
1650
|
+
/** Sets the labels' number format; `null` for the values' own. */
|
|
1651
|
+
setNumberFormat(formatCode: string | null, options?: ITransaction.OperationOptions): this;
|
|
1652
|
+
/** Returns whether the labels take the values' number format. */
|
|
1653
|
+
getLinkNumberFormat(): boolean;
|
|
1654
|
+
/** Sets whether the labels take the values' number format. */
|
|
1655
|
+
setLinkNumberFormat(linked: boolean, options?: ITransaction.OperationOptions): this;
|
|
1656
|
+
/** Returns whether each label shows the series' legend key. */
|
|
1657
|
+
getShowLegendKey(): boolean;
|
|
1658
|
+
/** Sets whether each label shows the series' legend key; showing it shows the labels. */
|
|
1659
|
+
setShowLegendKey(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1660
|
+
/** Returns whether a bubble's label shows its size. */
|
|
1661
|
+
getShowBubbleSize(): boolean;
|
|
1662
|
+
/** Sets whether a bubble's label shows its size. @throws ExpectedError on a series that is not a bubble's, as Excel refuses it. */
|
|
1663
|
+
setShowBubbleSize(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1664
|
+
/**
|
|
1665
|
+
* Returns the formula of the cells the labels show (Excel's "Value From Cells"), or `null`.
|
|
1666
|
+
*/
|
|
1667
|
+
getValueFromCellsFormula(): string | null;
|
|
1668
|
+
/**
|
|
1669
|
+
* Shows each label's text from a cell: cells, a formula naming them, or `null` for none. The
|
|
1670
|
+
* labels show them with whatever else they show.
|
|
1671
|
+
*/
|
|
1672
|
+
setValueFromCells(source: ICellRange | string | null, options?: ITransaction.OperationOptions): this;
|
|
1673
|
+
/** Returns what the labels are drawn with: their fill, border and font. Setting it shows the labels. */
|
|
1674
|
+
getStyle(): ITextBoxStyle;
|
|
1675
|
+
/** Returns the labels' angle in degrees counterclockwise, or `'vertical'` for stacked letters. */
|
|
1676
|
+
getTextOrientation(): number | 'vertical';
|
|
1677
|
+
/** Turns the labels: degrees from -90 to 90 counterclockwise, or `'vertical'`. */
|
|
1678
|
+
setTextOrientation(orientation: number | 'vertical', options?: ITransaction.OperationOptions): this;
|
|
1679
|
+
/** Sets several properties of the labels at once, as one step to undo. */
|
|
1680
|
+
update(update: IChart.IDataLabels.Update, options?: ITransaction.OperationOptions): this;
|
|
1681
|
+
/** For runtime type checking. */
|
|
1682
|
+
readonly isIDataLabels: true;
|
|
1683
|
+
}
|
|
1684
|
+
/**
|
|
1685
|
+
* {@inheritDoc IChart.IDataLabels}
|
|
1686
|
+
* @see
|
|
1687
|
+
* ### **Interface**
|
|
1688
|
+
*
|
|
1689
|
+
* {@link IChart.IDataLabels}
|
|
1690
|
+
*/
|
|
1691
|
+
namespace IDataLabels {
|
|
1692
|
+
/** What {@link IChart.IDataLabels.update} sets; each field as its setter takes it. */
|
|
1693
|
+
interface Update {
|
|
1694
|
+
visible?: boolean;
|
|
1695
|
+
showValue?: boolean;
|
|
1696
|
+
showCategoryName?: boolean;
|
|
1697
|
+
showSeriesName?: boolean;
|
|
1698
|
+
showPercentage?: boolean;
|
|
1699
|
+
position?: IChart.DataLabelPosition;
|
|
1700
|
+
separator?: string;
|
|
1701
|
+
numberFormat?: string | null;
|
|
1702
|
+
linkNumberFormat?: boolean;
|
|
1703
|
+
showLegendKey?: boolean;
|
|
1704
|
+
showBubbleSize?: boolean;
|
|
1705
|
+
valueFromCells?: ICellRange | string | null;
|
|
1706
|
+
style?: ITextBoxStyle.Update;
|
|
1707
|
+
textOrientation?: number | 'vertical';
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
/** The kind of line a trendline fits to its series, by Office Scripts' names (`ChartTrendlineType`). */
|
|
1711
|
+
type TrendlineType = 'linear' | 'exponential' | 'logarithmic' | 'polynomial' | 'power' | 'movingAverage';
|
|
1712
|
+
/**
|
|
1713
|
+
* A line fitted to a series' points, or their moving average, with the fit's equation and R² as
|
|
1714
|
+
* an optional label.
|
|
1715
|
+
*/
|
|
1716
|
+
interface ITrendline extends IChart.IElement {
|
|
1717
|
+
/** Returns the kind of line. */
|
|
1718
|
+
getType(): IChart.TrendlineType;
|
|
1719
|
+
/**
|
|
1720
|
+
* Sets the kind of line. A polynomial starts at order 2 and a moving average at period 2; the
|
|
1721
|
+
* other kind's option goes, and a set intercept stays only on a type that takes one.
|
|
1722
|
+
*/
|
|
1723
|
+
setType(type: IChart.TrendlineType, options?: ITransaction.OperationOptions): this;
|
|
1724
|
+
/** Returns a polynomial's order, 2 to 6; 2 for another type. */
|
|
1725
|
+
getPolynomialOrder(): number;
|
|
1726
|
+
/**
|
|
1727
|
+
* Sets a polynomial's order, 2 to 6. On another type it changes nothing, as in Excel.
|
|
1728
|
+
*
|
|
1729
|
+
* @throws ExpectedError for an order outside 2 to 6.
|
|
1730
|
+
*/
|
|
1731
|
+
setPolynomialOrder(order: number, options?: ITransaction.OperationOptions): this;
|
|
1732
|
+
/** Returns a moving average's period, in points; 2 for another type. */
|
|
1733
|
+
getMovingAveragePeriod(): number;
|
|
1734
|
+
/**
|
|
1735
|
+
* Sets a moving average's period: 2 to one fewer than the series' points.
|
|
1736
|
+
*
|
|
1737
|
+
* @throws ExpectedError for a period outside that, or on a trendline that is not a moving average.
|
|
1738
|
+
*/
|
|
1739
|
+
setMovingAveragePeriod(period: number, options?: ITransaction.OperationOptions): this;
|
|
1740
|
+
/** Returns how far the line runs past the last point, in x: in categories on a category axis. */
|
|
1741
|
+
getForwardPeriod(): number;
|
|
1742
|
+
/**
|
|
1743
|
+
* Sets how far the line runs past the last point; 0 for not at all. On a category axis a run adds
|
|
1744
|
+
* unlabeled categories.
|
|
1745
|
+
*
|
|
1746
|
+
* @throws ExpectedError for a negative run.
|
|
1747
|
+
*/
|
|
1748
|
+
setForwardPeriod(period: number, options?: ITransaction.OperationOptions): this;
|
|
1749
|
+
/** Returns how far the line runs before the first point. */
|
|
1750
|
+
getBackwardPeriod(): number;
|
|
1751
|
+
/**
|
|
1752
|
+
* Sets how far the line runs before the first point.
|
|
1753
|
+
*
|
|
1754
|
+
* @throws ExpectedError for a negative run, and on a category axis for one past half a category,
|
|
1755
|
+
* as in Excel.
|
|
1756
|
+
*/
|
|
1757
|
+
setBackwardPeriod(period: number, options?: ITransaction.OperationOptions): this;
|
|
1758
|
+
/**
|
|
1759
|
+
* Returns the y the line is drawn through at x = 0: the one set, else a linear, exponential or
|
|
1760
|
+
* polynomial fit's (`null` for the other types, which have none, or where the points allow no
|
|
1761
|
+
* fit).
|
|
1762
|
+
*/
|
|
1763
|
+
getIntercept(): number | null;
|
|
1764
|
+
/** Returns whether the intercept is the fit's own rather than set. */
|
|
1765
|
+
isInterceptAuto(): boolean;
|
|
1766
|
+
/**
|
|
1767
|
+
* Holds the fit to `intercept` at x = 0, or `'auto'` to let it go. Excel keeps an intercept on
|
|
1768
|
+
* a linear, exponential or polynomial fit and a moving average; on a logarithmic or power fit
|
|
1769
|
+
* it changes nothing, as in Excel.
|
|
1770
|
+
*/
|
|
1771
|
+
setIntercept(intercept: number | 'auto', options?: ITransaction.OperationOptions): this;
|
|
1772
|
+
/** Returns whether the label shows the fit's equation. */
|
|
1773
|
+
getShowEquation(): boolean;
|
|
1774
|
+
/** Sets whether the label shows the fit's equation; showing either part shows the label. */
|
|
1775
|
+
setShowEquation(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1776
|
+
/** Returns whether the label shows the fit's R². */
|
|
1777
|
+
getShowRSquared(): boolean;
|
|
1778
|
+
/** Sets whether the label shows the fit's R². */
|
|
1779
|
+
setShowRSquared(show: boolean, options?: ITransaction.OperationOptions): this;
|
|
1780
|
+
/** Returns the trendline's entry in the legend: the one set, else Excel's, `Linear (Sales)`. */
|
|
1781
|
+
getName(): string;
|
|
1782
|
+
/** Returns whether the name is Excel's own rather than set. */
|
|
1783
|
+
isNameAuto(): boolean;
|
|
1784
|
+
/** Sets the trendline's entry in the legend; `null` for Excel's own. */
|
|
1785
|
+
setName(name: string | null, options?: ITransaction.OperationOptions): this;
|
|
1786
|
+
/** Returns the label of the fit's equation and R². */
|
|
1787
|
+
getLabel(): IChart.ITrendlineLabel;
|
|
1788
|
+
/**
|
|
1789
|
+
* Returns what the line is drawn with (Office Scripts' `getFormat().getLine()`): reads resolve to
|
|
1790
|
+
* Excel's dotted 1.5 pt line in the series' color where it states none.
|
|
1791
|
+
*/
|
|
1792
|
+
getStyle(): IShapeStyle;
|
|
1793
|
+
/**
|
|
1794
|
+
* Returns the fit: the numbers the label shows, unrounded. `null` for a moving average, or where
|
|
1795
|
+
* the points allow no fit.
|
|
1796
|
+
*/
|
|
1797
|
+
getFit(): IChart.TrendlineFit | null;
|
|
1798
|
+
/** Removes the trendline from its series. */
|
|
1799
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
1800
|
+
/** Sets several properties of the trendline at once, as one step to undo. */
|
|
1801
|
+
update(update: IChart.ITrendline.Update, options?: ITransaction.OperationOptions): this;
|
|
1802
|
+
/** For runtime type checking. */
|
|
1803
|
+
readonly isITrendline: true;
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* {@inheritDoc IChart.ITrendline}
|
|
1807
|
+
* @see
|
|
1808
|
+
* ### **Interface**
|
|
1809
|
+
*
|
|
1810
|
+
* {@link IChart.ITrendline}
|
|
1811
|
+
*/
|
|
1812
|
+
namespace ITrendline {
|
|
1813
|
+
/**
|
|
1814
|
+
* What {@link IChart.ITrendline.update} sets; each field as its setter takes it. The type is set
|
|
1815
|
+
* before the options that depend on it.
|
|
1816
|
+
*/
|
|
1817
|
+
interface Update {
|
|
1818
|
+
type?: IChart.TrendlineType;
|
|
1819
|
+
polynomialOrder?: number;
|
|
1820
|
+
movingAveragePeriod?: number;
|
|
1821
|
+
forwardPeriod?: number;
|
|
1822
|
+
backwardPeriod?: number;
|
|
1823
|
+
intercept?: number | 'auto';
|
|
1824
|
+
showEquation?: boolean;
|
|
1825
|
+
showRSquared?: boolean;
|
|
1826
|
+
name?: string | null;
|
|
1827
|
+
style?: IShapeStyle.Update;
|
|
1828
|
+
label?: IChart.ITrendlineLabel.Update;
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
/** A fitted trendline's numbers. */
|
|
1832
|
+
interface TrendlineFit {
|
|
1833
|
+
type: Exclude<IChart.TrendlineType, 'movingAverage'>;
|
|
1834
|
+
/**
|
|
1835
|
+
* - `linear` and `polynomial`: the coefficients from x⁰ up, `[c0, c1, …]`;
|
|
1836
|
+
* - `exponential`: `[a, b]` of y = a·e^(b·x);
|
|
1837
|
+
* - `logarithmic`: `[a, b]` of y = a·ln(x) + b;
|
|
1838
|
+
* - `power`: `[a, b]` of y = a·x^b.
|
|
1839
|
+
*
|
|
1840
|
+
* x is the series' x on a scatter, else the category's number from 1.
|
|
1841
|
+
*/
|
|
1842
|
+
coefficients: number[];
|
|
1843
|
+
/** Excel's R²: the square of the correlation between the series' y and the fit's. */
|
|
1844
|
+
rSquared: number;
|
|
1845
|
+
}
|
|
1846
|
+
/** The label of a trendline's equation and R². */
|
|
1847
|
+
interface ITrendlineLabel extends IChart.IElement {
|
|
1848
|
+
/** Returns the label's text as drawn, its lines parted by `\n`; `null` when it shows nothing. */
|
|
1849
|
+
getText(): string | null;
|
|
1850
|
+
/** Returns the format of the label's numbers: `General` unless set. */
|
|
1851
|
+
getNumberFormat(): string;
|
|
1852
|
+
/** Sets the format of the label's numbers; `null` for `General`. */
|
|
1853
|
+
setNumberFormat(formatCode: string | null, options?: ITransaction.OperationOptions): this;
|
|
1854
|
+
/** Sets several properties of the label at once, as one step to undo. */
|
|
1855
|
+
update(update: IChart.ITrendlineLabel.Update, options?: ITransaction.OperationOptions): this;
|
|
1856
|
+
/** For runtime type checking. */
|
|
1857
|
+
readonly isITrendlineLabel: true;
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* {@inheritDoc IChart.ITrendlineLabel}
|
|
1861
|
+
* @see
|
|
1862
|
+
* ### **Interface**
|
|
1863
|
+
*
|
|
1864
|
+
* {@link IChart.ITrendlineLabel}
|
|
1865
|
+
*/
|
|
1866
|
+
namespace ITrendlineLabel {
|
|
1867
|
+
/** What {@link IChart.ITrendlineLabel.update} sets. */
|
|
1868
|
+
interface Update {
|
|
1869
|
+
numberFormat?: string | null;
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
/**
|
|
1873
|
+
* How far error bars reach, by Office Scripts' names (`ChartErrorBarsType`): a fixed value, a
|
|
1874
|
+
* percentage of each value, standard deviations of the series' values (the bars then about their
|
|
1875
|
+
* mean), their standard error, or each point's own amounts.
|
|
1876
|
+
*/
|
|
1877
|
+
type ErrorBarsType = 'fixedValue' | 'percent' | 'stDev' | 'stError' | 'custom';
|
|
1878
|
+
/** Which way from each point error bars run (`ChartErrorBarsInclude`). */
|
|
1879
|
+
type ErrorBarsInclude = 'both' | 'minusValues' | 'plusValues';
|
|
1880
|
+
/** A series' error bars, of its values or of a scatter's x values. */
|
|
1881
|
+
interface IErrorBars extends IChart.IElement {
|
|
1882
|
+
/** Returns whether the bars are drawn. */
|
|
1883
|
+
getVisible(): boolean;
|
|
1884
|
+
/**
|
|
1885
|
+
* Shows the bars, as Excel's `HasErrorBars` adds them (a fixed 5 both ways, capped), or removes
|
|
1886
|
+
* them.
|
|
1887
|
+
*/
|
|
1888
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1889
|
+
/** Returns how far the bars reach; `fixedValue` where there are none. */
|
|
1890
|
+
getType(): IChart.ErrorBarsType;
|
|
1891
|
+
/**
|
|
1892
|
+
* Sets how far the bars reach, showing them. A new type takes Excel's amount for it: 5 for a
|
|
1893
|
+
* fixed value and a percentage, 1 for standard deviations. For `custom`, see
|
|
1894
|
+
* {@link IChart.IErrorBars.setCustomValues}.
|
|
1895
|
+
*/
|
|
1896
|
+
setType(type: IChart.ErrorBarsType, options?: ITransaction.OperationOptions): this;
|
|
1897
|
+
/** Returns the amount of a fixed value, a percentage or standard deviations; `null` for the other types. */
|
|
1898
|
+
getAmount(): number | null;
|
|
1899
|
+
/**
|
|
1900
|
+
* Sets the amount, showing the bars.
|
|
1901
|
+
*
|
|
1902
|
+
* @throws ExpectedError for a negative amount, or for bars of standard error or custom values.
|
|
1903
|
+
*/
|
|
1904
|
+
setAmount(amount: number, options?: ITransaction.OperationOptions): this;
|
|
1905
|
+
/** Returns which way from each point the bars run. */
|
|
1906
|
+
getInclude(): IChart.ErrorBarsInclude;
|
|
1907
|
+
/** Sets which way from each point the bars run, showing them. */
|
|
1908
|
+
setInclude(include: IChart.ErrorBarsInclude, options?: ITransaction.OperationOptions): this;
|
|
1909
|
+
/** Returns whether the bars' ends are capped. */
|
|
1910
|
+
getEndStyleCap(): boolean;
|
|
1911
|
+
/** Sets whether the bars' ends are capped, showing them. */
|
|
1912
|
+
setEndStyleCap(cap: boolean, options?: ITransaction.OperationOptions): this;
|
|
1913
|
+
/**
|
|
1914
|
+
* Returns the formula of custom bars' amounts above each point, an array constant such as
|
|
1915
|
+
* `{1,2,3}` where they are written into the chart; `null` for other bars.
|
|
1916
|
+
*/
|
|
1917
|
+
getPlusValuesFormula(): string | null;
|
|
1918
|
+
/** Returns the formula of custom bars' amounts below each point, as {@link IChart.IErrorBars.getPlusValuesFormula}. */
|
|
1919
|
+
getMinusValuesFormula(): string | null;
|
|
1920
|
+
/**
|
|
1921
|
+
* Makes the bars custom: each point's amount above from `plus` and below from `minus`, each
|
|
1922
|
+
* cells, a formula or an array constant (`{1,2,3}`), as VBA's `ErrorBar` takes them.
|
|
1923
|
+
*/
|
|
1924
|
+
setCustomValues(plus: ICellRange | string, minus: ICellRange | string, options?: ITransaction.OperationOptions): this;
|
|
1925
|
+
/** Returns what the bars are drawn with (Office Scripts' `getFormat().getLine()`). */
|
|
1926
|
+
getStyle(): IShapeStyle;
|
|
1927
|
+
/** Sets several properties of the bars at once, as one step to undo; the type before the amount. */
|
|
1928
|
+
update(update: IChart.IErrorBars.Update, options?: ITransaction.OperationOptions): this;
|
|
1929
|
+
/** For runtime type checking. */
|
|
1930
|
+
readonly isIErrorBars: true;
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* {@inheritDoc IChart.IErrorBars}
|
|
1934
|
+
* @see
|
|
1935
|
+
* ### **Interface**
|
|
1936
|
+
*
|
|
1937
|
+
* {@link IChart.IErrorBars}
|
|
1938
|
+
*/
|
|
1939
|
+
namespace IErrorBars {
|
|
1940
|
+
/** What {@link IChart.IErrorBars.update} sets; each field as its setter takes it. */
|
|
1941
|
+
interface Update {
|
|
1942
|
+
visible?: boolean;
|
|
1943
|
+
type?: IChart.ErrorBarsType;
|
|
1944
|
+
amount?: number;
|
|
1945
|
+
include?: IChart.ErrorBarsInclude;
|
|
1946
|
+
endStyleCap?: boolean;
|
|
1947
|
+
customValues?: {
|
|
1948
|
+
plus: ICellRange | string;
|
|
1949
|
+
minus: ICellRange | string;
|
|
1950
|
+
};
|
|
1951
|
+
style?: IShapeStyle.Update;
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
/**
|
|
1955
|
+
* A line or stock chart's up/down bars: in each category a bar from the first series' value to the
|
|
1956
|
+
* last's, an up bar where the last is higher and a down bar where it is not (VBA's
|
|
1957
|
+
* `ChartGroup.UpBars` and `DownBars`). The series of the group share them.
|
|
1958
|
+
*/
|
|
1959
|
+
interface IUpDownBars extends IChart.IElement {
|
|
1960
|
+
/** Returns whether the bars are drawn. */
|
|
1961
|
+
getVisible(): boolean;
|
|
1962
|
+
/** Shows the bars as Excel adds them, or removes them. */
|
|
1963
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
1964
|
+
/** Returns the gap between the bars, as a percentage of a bar's width; Excel's 150 where there are none. */
|
|
1965
|
+
getGapWidth(): number;
|
|
1966
|
+
/** Sets the gap between the bars, 0 to 500, showing them. */
|
|
1967
|
+
setGapWidth(gapWidth: number, options?: ITransaction.OperationOptions): this;
|
|
1968
|
+
/** Returns what the up bars are drawn with: fill and line. Setting it shows the bars. */
|
|
1969
|
+
getUpBarsStyle(): IShapeStyle;
|
|
1970
|
+
/** Returns what the down bars are drawn with: fill and line. Setting it shows the bars. */
|
|
1971
|
+
getDownBarsStyle(): IShapeStyle;
|
|
1972
|
+
/** Sets several properties of the bars at once, as one step to undo. */
|
|
1973
|
+
update(update: IChart.IUpDownBars.Update, options?: ITransaction.OperationOptions): this;
|
|
1974
|
+
/** For runtime type checking. */
|
|
1975
|
+
readonly isIUpDownBars: true;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* {@inheritDoc IChart.IUpDownBars}
|
|
1979
|
+
* @see
|
|
1980
|
+
* ### **Interface**
|
|
1981
|
+
*
|
|
1982
|
+
* {@link IChart.IUpDownBars}
|
|
1983
|
+
*/
|
|
1984
|
+
namespace IUpDownBars {
|
|
1985
|
+
/** What {@link IChart.IUpDownBars.update} sets; each field as its setter takes it. */
|
|
1986
|
+
interface Update {
|
|
1987
|
+
visible?: boolean;
|
|
1988
|
+
gapWidth?: number;
|
|
1989
|
+
upBars?: IShapeStyle.Update;
|
|
1990
|
+
downBars?: IShapeStyle.Update;
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* A chart group's high-low lines (from each category's lowest value to its highest), drop lines
|
|
1995
|
+
* (from each category's values to the category axis) or series lines (joining each stacked
|
|
1996
|
+
* series' ends from one category to the next). The series of the group share them.
|
|
1997
|
+
*/
|
|
1998
|
+
interface ILines extends IChart.IElement {
|
|
1999
|
+
/** Returns whether the lines are drawn. */
|
|
2000
|
+
getVisible(): boolean;
|
|
2001
|
+
/** Shows the lines as Excel adds them, or removes them. */
|
|
2002
|
+
setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
|
|
2003
|
+
/** Returns what the lines are drawn with; only its line applies. Setting it shows the lines. */
|
|
2004
|
+
getStyle(): IShapeStyle;
|
|
2005
|
+
/** Sets several properties of the lines at once, as one step to undo. */
|
|
2006
|
+
update(update: IChart.ILines.Update, options?: ITransaction.OperationOptions): this;
|
|
2007
|
+
/** For runtime type checking. */
|
|
2008
|
+
readonly isILines: true;
|
|
2009
|
+
}
|
|
2010
|
+
/**
|
|
2011
|
+
* {@inheritDoc IChart.ILines}
|
|
2012
|
+
* @see
|
|
2013
|
+
* ### **Interface**
|
|
2014
|
+
*
|
|
2015
|
+
* {@link IChart.ILines}
|
|
2016
|
+
*/
|
|
2017
|
+
namespace ILines {
|
|
2018
|
+
/** What {@link IChart.ILines.update} sets; each field as its setter takes it. */
|
|
2019
|
+
interface Update {
|
|
2020
|
+
visible?: boolean;
|
|
2021
|
+
style?: IShapeStyle.Update;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
/** What {@link IChart.update} sets; each field as its part's setter takes it. */
|
|
2025
|
+
interface Update {
|
|
2026
|
+
/** The title's properties, or its text. */
|
|
2027
|
+
title?: IChart.ITitle.Update | string | null;
|
|
2028
|
+
legend?: IChart.ILegend.Update;
|
|
2029
|
+
displayBlanksAs?: IChart.DisplayBlanksAs;
|
|
2030
|
+
/** The primary value axis's properties. */
|
|
2031
|
+
valueAxis?: IChart.IAxis.Update;
|
|
2032
|
+
/** The primary category axis's properties. */
|
|
2033
|
+
categoryAxis?: IChart.IAxis.Update;
|
|
2034
|
+
/** Set first: the type every series is drawn as. */
|
|
2035
|
+
chartType?: IChart.Type | string;
|
|
2036
|
+
plotVisibleOnly?: boolean;
|
|
2037
|
+
roundedCorners?: boolean;
|
|
2038
|
+
/** The chart area's fill and border, and the chart's font: every text's. */
|
|
2039
|
+
style?: ITextBoxStyle.Update;
|
|
2040
|
+
plotArea?: IChart.IPlotArea.Update;
|
|
2041
|
+
dataTable?: IChart.IDataTable.Update;
|
|
2042
|
+
/** Every series' data labels. */
|
|
2043
|
+
dataLabels?: IChart.IDataLabels.Update;
|
|
172
2044
|
}
|
|
173
2045
|
interface JSON {
|
|
174
|
-
/**
|
|
175
|
-
*
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
* with freshly-generated ids on write. */
|
|
2046
|
+
/**
|
|
2047
|
+
* The id the chart's frame had in the file it was read from. A writer keeps it where it is
|
|
2048
|
+
* free in the drawing, so references to the frame by id still find it.
|
|
2049
|
+
*/
|
|
179
2050
|
sourceId?: number;
|
|
180
2051
|
/**
|
|
181
2052
|
* The chart's own document part, and the parts that part references.
|
|
182
2053
|
*
|
|
183
2054
|
* @remarks
|
|
184
|
-
* The
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* of the chart's own markup; the rest is for writing the chart back out.
|
|
2055
|
+
* The parts the chart needs to be written back: its style and color definitions, the shapes
|
|
2056
|
+
* drawn over it, an embedded workbook holding its data. The part's own markup is kept only while
|
|
2057
|
+
* the chart still states what it was read from, so an untouched chart is written back as it was.
|
|
188
2058
|
*/
|
|
189
2059
|
part?: IEmbeddedPart.JSON;
|
|
2060
|
+
/**
|
|
2061
|
+
* The chart: every chart type, its data, axes, text and formatting.
|
|
2062
|
+
*/
|
|
2063
|
+
model?: ChartModel.ChartSpace;
|
|
190
2064
|
}
|
|
191
2065
|
interface Events extends IMovable.ContentEvents {
|
|
2066
|
+
/**
|
|
2067
|
+
* Called when what {@link IChart.getLayout} returns may have changed: the chart changed, a
|
|
2068
|
+
* cell it plots changed (its value, or whether its row or column is hidden), its movable was
|
|
2069
|
+
* resized, its theme changed, or a font it is measured with arrived. Call `getLayout` again
|
|
2070
|
+
* to see the new layout.
|
|
2071
|
+
*
|
|
2072
|
+
* @remarks
|
|
2073
|
+
* Cell changes are announced once per commit, after every cell of it has landed, so a
|
|
2074
|
+
* `getLayout` from the listener reads the new values; a recalculation that changes plotted
|
|
2075
|
+
* cells announces again when its results land.
|
|
2076
|
+
*/
|
|
2077
|
+
onLayoutChange?(source: IChart): void;
|
|
192
2078
|
}
|
|
193
2079
|
interface IListeners extends IListener.Callbacks<IChart, IChart.Events> {
|
|
194
2080
|
}
|