@office-open/core 0.8.1 → 0.9.1

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.
Files changed (35) hide show
  1. package/README.md +32 -60
  2. package/dist/chart/index.d.mts +2 -2
  3. package/dist/chart/index.mjs +2 -2
  4. package/dist/chart-DNpai28f.mjs +365 -0
  5. package/dist/descriptor/index.d.mts +2 -0
  6. package/dist/descriptor/index.mjs +2 -0
  7. package/dist/descriptor-57JUzfpG.mjs +282 -0
  8. package/dist/drawingml/index.d.mts +2 -2
  9. package/dist/drawingml/index.mjs +2 -2
  10. package/dist/{index-Cj2Yf5mk.d.mts → index-BKotL3AP.d.mts} +10 -7
  11. package/dist/{index-DEvpdl1o.d.mts → index-BqJRDf5H.d.mts} +1423 -1837
  12. package/dist/index-D81RV9Vc.d.mts +153 -0
  13. package/dist/{index-BCUfgp9A.d.mts → index-DmPBJwSk.d.mts} +2 -2
  14. package/dist/{index-D0N5Bw2M.d.mts → index-eu1aFQCm.d.mts} +39 -28
  15. package/dist/index-xXbaecaB.d.mts +137 -0
  16. package/dist/index.d.mts +8 -558
  17. package/dist/index.mjs +7 -2091
  18. package/dist/patch/index.d.mts +1 -1
  19. package/dist/smartart/index.d.mts +2 -2
  20. package/dist/smartart/index.mjs +2 -2
  21. package/dist/{smartart-9ZpWgmIy.mjs → smartart-DCY-Vdv7.mjs} +120 -204
  22. package/dist/src-DPuDEZYF.mjs +7477 -0
  23. package/dist/theme/index.d.mts +2 -2
  24. package/dist/theme/index.mjs +2 -2
  25. package/dist/{theme-FWD_20fH.mjs → theme-CiNzdl-9.mjs} +117 -22
  26. package/dist/{values.d.mts → util/values.d.mts} +1 -1
  27. package/dist/{values.mjs → util/values.mjs} +1 -1
  28. package/dist/{values-BOWpTgBE.mjs → values-CVIZcTRw.mjs} +1 -1
  29. package/dist/{values-COjPGYkS.d.mts → values-Dqj8cbcy.d.mts} +1 -1
  30. package/package.json +13 -10
  31. package/dist/chart-CigYrDhf.mjs +0 -1242
  32. package/dist/drawingml-B-2eEHAF.mjs +0 -7109
  33. package/dist/index-Bh6s66Up.d.mts +0 -381
  34. package/dist/index-CoTp4wVf.d.mts +0 -202
  35. package/dist/xml-components-BuFdDxHN.mjs +0 -322
@@ -1,1242 +0,0 @@
1
- import { a as BuilderElement, g as wrapEl, l as chartAttr, o as EmptyElement, y as XmlComponent } from "./xml-components-BuFdDxHN.mjs";
2
- //#region src/chart/axes.ts
3
- /**
4
- * c:scaling — axis scaling configuration (minOccurs=1 in EG_AxShared).
5
- */
6
- var Scaling$1 = class extends XmlComponent {
7
- constructor() {
8
- super("c:scaling");
9
- this.root.push(wrapEl("c:orientation", chartAttr({ val: "minMax" })));
10
- }
11
- };
12
- /**
13
- * c:catAx — category axis.
14
- *
15
- * XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., crossAx, crosses)
16
- * then: auto, lblAlgn, lblOffset, tickLblSkip, tickMarkSkip, noMultiLvlLbl
17
- */
18
- var CatAx = class extends XmlComponent {
19
- constructor(axId, crossAx) {
20
- super("c:catAx");
21
- this.root.push(wrapEl("c:axId", chartAttr({ val: axId })));
22
- this.root.push(new Scaling$1());
23
- this.root.push(wrapEl("c:delete", chartAttr({ val: 0 })));
24
- this.root.push(wrapEl("c:axPos", chartAttr({ val: "b" })));
25
- this.root.push(wrapEl("c:crossAx", chartAttr({ val: crossAx })));
26
- this.root.push(wrapEl("c:crosses", chartAttr({ val: "autoZero" })));
27
- this.root.push(wrapEl("c:auto", chartAttr({ val: 1 })));
28
- this.root.push(wrapEl("c:lblOffset", chartAttr({ val: 100 })));
29
- this.root.push(wrapEl("c:noMultiLvlLbl", chartAttr({ val: 0 })));
30
- }
31
- };
32
- /**
33
- * c:valAx — value axis.
34
- *
35
- * XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., spPr, ..., crossAx, crosses)
36
- * then: crossBetween, majorUnit, minorUnit, dispUnits
37
- */
38
- var ValAx = class extends XmlComponent {
39
- constructor(axId, crossAx) {
40
- super("c:valAx");
41
- this.root.push(wrapEl("c:axId", chartAttr({ val: axId })));
42
- this.root.push(new Scaling$1());
43
- this.root.push(wrapEl("c:delete", chartAttr({ val: 0 })));
44
- this.root.push(wrapEl("c:axPos", chartAttr({ val: "l" })));
45
- this.root.push(wrapEl("c:numFmt", chartAttr({
46
- formatCode: "General",
47
- sourceLinked: 1
48
- })));
49
- this.root.push(new BuilderElement({ name: "c:spPr" }));
50
- this.root.push(wrapEl("c:crossAx", chartAttr({ val: crossAx })));
51
- this.root.push(wrapEl("c:crosses", chartAttr({ val: "autoZero" })));
52
- }
53
- };
54
- var SerAx = class extends XmlComponent {
55
- constructor(axId, crossAx) {
56
- super("c:serAx");
57
- this.root.push(wrapEl("c:axId", chartAttr({ val: axId })));
58
- this.root.push(new Scaling$1());
59
- this.root.push(wrapEl("c:delete", chartAttr({ val: 0 })));
60
- this.root.push(wrapEl("c:axPos", chartAttr({ val: "b" })));
61
- this.root.push(wrapEl("c:numFmt", chartAttr({
62
- formatCode: "General",
63
- sourceLinked: 1
64
- })));
65
- this.root.push(new BuilderElement({ name: "c:spPr" }));
66
- this.root.push(wrapEl("c:crossAx", chartAttr({ val: crossAx })));
67
- this.root.push(wrapEl("c:crosses", chartAttr({ val: "autoZero" })));
68
- this.root.push(wrapEl("c:tickLblSkip", chartAttr({ val: 1 })));
69
- }
70
- };
71
- //#endregion
72
- //#region src/chart/series/series-data.ts
73
- const createStrRef$1 = (values) => {
74
- return new StrRef(typeof values === "string" ? [values] : values);
75
- };
76
- const createNumRef$1 = (values) => new NumRef(values);
77
- var StrRef = class extends XmlComponent {
78
- constructor(values) {
79
- super("c:strRef");
80
- this.root.push(new EmptyElement("c:f"));
81
- this.root.push(new StrCache$1(values));
82
- }
83
- };
84
- var StrCache$1 = class extends XmlComponent {
85
- constructor(values) {
86
- super("c:strCache");
87
- this.root.push(wrapEl("c:ptCount", chartAttr({ val: values.length })));
88
- for (let i = 0; i < values.length; i++) this.root.push(new StrPt$1(i, values[i]));
89
- }
90
- };
91
- var StrPt$1 = class extends XmlComponent {
92
- constructor(index, value) {
93
- super("c:pt");
94
- this.root.push(chartAttr({ idx: index }));
95
- this.root.push(new StringValue$1("c:v", value));
96
- }
97
- };
98
- var NumRef = class extends XmlComponent {
99
- constructor(values) {
100
- super("c:numRef");
101
- this.root.push(new EmptyElement("c:f"));
102
- this.root.push(new NumCache$1(values));
103
- }
104
- };
105
- var NumCache$1 = class extends XmlComponent {
106
- constructor(values) {
107
- super("c:numCache");
108
- this.root.push(new FormatCode$1("General"));
109
- this.root.push(wrapEl("c:ptCount", chartAttr({ val: values.length })));
110
- for (let i = 0; i < values.length; i++) this.root.push(new NumPt$1(i, values[i]));
111
- }
112
- };
113
- var NumPt$1 = class extends XmlComponent {
114
- constructor(index, value) {
115
- super("c:pt");
116
- this.root.push(chartAttr({ idx: index }));
117
- this.root.push(new StringValue$1("c:v", String(value)));
118
- }
119
- };
120
- var FormatCode$1 = class extends XmlComponent {
121
- constructor(code) {
122
- super("c:formatCode");
123
- this.root.push(code);
124
- }
125
- };
126
- var StringValue$1 = class extends XmlComponent {
127
- constructor(name, val) {
128
- super(name);
129
- this.root.push(val);
130
- }
131
- };
132
- //#endregion
133
- //#region src/chart/chart-types/area-chart.ts
134
- var AreaChart = class extends XmlComponent {
135
- constructor(options) {
136
- super("c:areaChart");
137
- this.root.push(wrapEl("c:grouping", chartAttr({ val: "standard" })));
138
- for (let i = 0; i < options.series.length; i++) this.root.push(new AreaSeries(i, options.series[i], options.categories));
139
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
140
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
141
- }
142
- };
143
- var AreaSeries = class extends XmlComponent {
144
- constructor(index, series, categories) {
145
- super("c:ser");
146
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
147
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
148
- this.root.push(new SeriesTx$13(series.name));
149
- this.root.push(new EmptyElement("c:spPr"));
150
- this.root.push(new SeriesCat$10(categories));
151
- this.root.push(new SeriesVal$11(series.values));
152
- }
153
- };
154
- var SeriesTx$13 = class extends XmlComponent {
155
- constructor(name) {
156
- super("c:tx");
157
- this.root.push(createStrRef$1(name));
158
- }
159
- };
160
- var SeriesCat$10 = class extends XmlComponent {
161
- constructor(categories) {
162
- super("c:cat");
163
- this.root.push(createStrRef$1(categories));
164
- }
165
- };
166
- var SeriesVal$11 = class extends XmlComponent {
167
- constructor(values) {
168
- super("c:val");
169
- this.root.push(createNumRef$1(values));
170
- }
171
- };
172
- //#endregion
173
- //#region src/chart/chart-types/area3d-chart.ts
174
- var Area3DChart = class extends XmlComponent {
175
- constructor(options) {
176
- super("c:area3DChart");
177
- this.root.push(wrapEl("c:grouping", chartAttr({ val: "standard" })));
178
- for (let i = 0; i < options.series.length; i++) this.root.push(new Area3DSeries(i, options.series[i], options.categories));
179
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
180
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
181
- this.root.push(wrapEl("c:axId", chartAttr({ val: 30 })));
182
- }
183
- };
184
- var Area3DSeries = class extends XmlComponent {
185
- constructor(index, series, categories) {
186
- super("c:ser");
187
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
188
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
189
- this.root.push(new SeriesTx$12(series.name));
190
- this.root.push(new EmptyElement("c:spPr"));
191
- this.root.push(new SeriesCat$9(categories));
192
- this.root.push(new SeriesVal$10(series.values));
193
- }
194
- };
195
- var SeriesTx$12 = class extends XmlComponent {
196
- constructor(name) {
197
- super("c:tx");
198
- this.root.push(createStrRef$1(name));
199
- }
200
- };
201
- var SeriesCat$9 = class extends XmlComponent {
202
- constructor(categories) {
203
- super("c:cat");
204
- this.root.push(createStrRef$1(categories));
205
- }
206
- };
207
- var SeriesVal$10 = class extends XmlComponent {
208
- constructor(values) {
209
- super("c:val");
210
- this.root.push(createNumRef$1(values));
211
- }
212
- };
213
- //#endregion
214
- //#region src/chart/extensions.ts
215
- /**
216
- * Chart extensions — trendlines, error bars, date axis, data labels, 3D view.
217
- *
218
- * These components are used inside chart series (trendline, errBars),
219
- * plot area axes (dateAx), and chart space (view3D).
220
- *
221
- * @module
222
- */
223
- const TrendlineType = {
224
- EXP: "exp",
225
- LINEAR: "linear",
226
- LOG: "log",
227
- MOVING_AVG: "movingAvg",
228
- POLY: "poly",
229
- POWER: "power"
230
- };
231
- /**
232
- * c:trendline — a trendline on a chart series.
233
- *
234
- * XSD: CT_Trendline (dml-chart.xsd)
235
- */
236
- var Trendline = class extends XmlComponent {
237
- constructor(options) {
238
- super("c:trendline");
239
- if (options.name !== void 0) this.root.push(options.name);
240
- this.root.push(wrapEl("c:trendlineType", chartAttr({ val: options.type ?? TrendlineType.LINEAR })));
241
- if (options.order !== void 0) this.root.push(wrapEl("c:order", chartAttr({ val: options.order })));
242
- if (options.period !== void 0) this.root.push(wrapEl("c:period", chartAttr({ val: options.period })));
243
- if (options.forward !== void 0) this.root.push(wrapEl("c:forward", chartAttr({ val: options.forward })));
244
- if (options.backward !== void 0) this.root.push(wrapEl("c:backward", chartAttr({ val: options.backward })));
245
- if (options.intercept !== void 0) this.root.push(wrapEl("c:intercept", chartAttr({ val: options.intercept })));
246
- if (options.dispRSqr) this.root.push(wrapEl("c:dispRSqr", chartAttr({ val: 1 })));
247
- if (options.dispEq) this.root.push(wrapEl("c:dispEq", chartAttr({ val: 1 })));
248
- }
249
- };
250
- const ErrorBarDirection = {
251
- BOTH: "both",
252
- X: "x",
253
- Y: "y"
254
- };
255
- const ErrorBarType = {
256
- BOTH: "both",
257
- MINUS: "minus",
258
- PLUS: "plus"
259
- };
260
- const ErrorValueType = {
261
- CUST: "cust",
262
- FIXED: "fixedVal",
263
- PERCENTAGE: "percentage",
264
- STD_DEV: "stdDev",
265
- STD_ERR: "stdErr"
266
- };
267
- /**
268
- * c:errBars — error bars on a chart series.
269
- *
270
- * XSD: CT_ErrBars (dml-chart.xsd)
271
- */
272
- var ErrorBars = class extends XmlComponent {
273
- constructor(options) {
274
- super("c:errBars");
275
- if (options.direction !== void 0) this.root.push(wrapEl("c:errDir", chartAttr({ val: options.direction })));
276
- this.root.push(wrapEl("c:errBarType", chartAttr({ val: options.barType ?? ErrorBarType.BOTH })));
277
- this.root.push(wrapEl("c:errValType", chartAttr({ val: options.valueType ?? ErrorValueType.STD_ERR })));
278
- if (options.noEndCap) this.root.push(wrapEl("c:noEndCap", chartAttr({ val: 1 })));
279
- if (options.value !== void 0) this.root.push(wrapEl("c:val", chartAttr({ val: options.value })));
280
- }
281
- };
282
- const DataLabelPosition = {
283
- BEST_FIT: "bestFit",
284
- BOTTOM: "b",
285
- CENTER: "ctr",
286
- IN_BASE: "inBase",
287
- IN_END: "inEnd",
288
- LEFT: "l",
289
- OUT_END: "outEnd",
290
- RIGHT: "r",
291
- TOP: "t"
292
- };
293
- /**
294
- * c:dLbls — data labels settings for a chart series.
295
- *
296
- * Implements EG_DLblShared group from dml-chart.xsd.
297
- */
298
- var DataLabels = class extends XmlComponent {
299
- constructor(options) {
300
- super("c:dLbls");
301
- if (options.numFmt !== void 0) this.root.push(wrapEl("c:numFmt", chartAttr({
302
- formatCode: options.numFmt,
303
- sourceLinked: 0
304
- })));
305
- this.root.push(new BuilderElement({ name: "c:spPr" }));
306
- if (options.position !== void 0) this.root.push(wrapEl("c:dLblPos", chartAttr({ val: options.position })));
307
- if (options.showLegendKey) this.root.push(wrapEl("c:showLegendKey", chartAttr({ val: 1 })));
308
- if (options.showVal) this.root.push(wrapEl("c:showVal", chartAttr({ val: 1 })));
309
- if (options.showCatName) this.root.push(wrapEl("c:showCatName", chartAttr({ val: 1 })));
310
- if (options.showSerName) this.root.push(wrapEl("c:showSerName", chartAttr({ val: 1 })));
311
- if (options.showPercent) this.root.push(wrapEl("c:showPercent", chartAttr({ val: 1 })));
312
- if (options.showBubbleSize) this.root.push(wrapEl("c:showBubbleSize", chartAttr({ val: 1 })));
313
- if (options.separator !== void 0) this.root.push(new SeparatorElement(options.separator));
314
- }
315
- };
316
- var SeparatorElement = class extends XmlComponent {
317
- constructor(val) {
318
- super("c:separator");
319
- this.root.push(val);
320
- }
321
- };
322
- const TimeUnit = {
323
- DAYS: "days",
324
- MONTHS: "months",
325
- YEARS: "years"
326
- };
327
- /**
328
- * c:dateAx — date axis for time-series data.
329
- *
330
- * XSD: CT_DateAx (dml-chart.xsd)
331
- */
332
- var DateAx = class extends XmlComponent {
333
- constructor(axId, crossAx) {
334
- super("c:dateAx");
335
- this.root.push(wrapEl("c:axId", chartAttr({ val: axId })));
336
- this.root.push(new Scaling());
337
- this.root.push(wrapEl("c:delete", chartAttr({ val: 0 })));
338
- this.root.push(wrapEl("c:axPos", chartAttr({ val: "b" })));
339
- this.root.push(wrapEl("c:numFmt", chartAttr({
340
- formatCode: "General",
341
- sourceLinked: 1
342
- })));
343
- this.root.push(new BuilderElement({ name: "c:spPr" }));
344
- this.root.push(wrapEl("c:crossAx", chartAttr({ val: crossAx })));
345
- this.root.push(wrapEl("c:crosses", chartAttr({ val: "autoZero" })));
346
- this.root.push(wrapEl("c:auto", chartAttr({ val: 1 })));
347
- this.root.push(wrapEl("c:lblOffset", chartAttr({ val: 100 })));
348
- }
349
- };
350
- var Scaling = class extends XmlComponent {
351
- constructor() {
352
- super("c:scaling");
353
- this.root.push(wrapEl("c:orientation", chartAttr({ val: "minMax" })));
354
- }
355
- };
356
- /**
357
- * c:view3D — 3D view properties for 3D charts.
358
- *
359
- * XSD: CT_View3D (dml-chart.xsd)
360
- */
361
- var View3D = class extends XmlComponent {
362
- constructor(options) {
363
- super("c:view3D");
364
- const opts = options ?? {};
365
- if (opts.rotX !== void 0) this.root.push(wrapEl("c:rotX", chartAttr({ val: opts.rotX })));
366
- if (opts.heightPercent !== void 0) this.root.push(wrapEl("c:hPercent", chartAttr({ val: opts.heightPercent })));
367
- if (opts.rotY !== void 0) this.root.push(wrapEl("c:rotY", chartAttr({ val: opts.rotY })));
368
- if (opts.depthPercent !== void 0) this.root.push(wrapEl("c:depthPercent", chartAttr({ val: opts.depthPercent })));
369
- if (opts.rightAngleAxes !== void 0) this.root.push(wrapEl("c:rAngAx", chartAttr({ val: opts.rightAngleAxes ? 1 : 0 })));
370
- if (opts.perspective !== void 0) this.root.push(wrapEl("c:perspective", chartAttr({ val: opts.perspective })));
371
- }
372
- };
373
- //#endregion
374
- //#region src/chart/chart-types/bar-chart.ts
375
- var BarChart = class extends XmlComponent {
376
- constructor(options) {
377
- super("c:barChart");
378
- this.root.push(wrapEl("c:barDir", chartAttr({ val: options.barDirection })));
379
- this.root.push(wrapEl("c:grouping", chartAttr({ val: "clustered" })));
380
- for (let i = 0; i < options.series.length; i++) this.root.push(new BarSeries(i, options.series[i], options.categories));
381
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
382
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
383
- }
384
- };
385
- var BarSeries = class extends XmlComponent {
386
- constructor(index, series, categories) {
387
- super("c:ser");
388
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
389
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
390
- this.root.push(new SeriesTx$11(series.name));
391
- this.root.push(new EmptyElement("c:spPr"));
392
- if (series.dataLabels) this.root.push(new DataLabels(series.dataLabels));
393
- if (series.trendlines) for (const tl of series.trendlines) this.root.push(new Trendline(tl));
394
- if (series.errorBars) this.root.push(new ErrorBars(series.errorBars));
395
- this.root.push(new SeriesCat$8(categories));
396
- this.root.push(new SeriesVal$9(series.values));
397
- }
398
- };
399
- var SeriesTx$11 = class extends XmlComponent {
400
- constructor(name) {
401
- super("c:tx");
402
- this.root.push(createStrRef$1(name));
403
- }
404
- };
405
- var SeriesCat$8 = class extends XmlComponent {
406
- constructor(categories) {
407
- super("c:cat");
408
- this.root.push(createStrRef$1(categories));
409
- }
410
- };
411
- var SeriesVal$9 = class extends XmlComponent {
412
- constructor(values) {
413
- super("c:val");
414
- this.root.push(createNumRef$1(values));
415
- }
416
- };
417
- //#endregion
418
- //#region src/chart/chart-types/bar3d-chart.ts
419
- var Bar3DChart = class extends XmlComponent {
420
- constructor(options) {
421
- super("c:bar3DChart");
422
- this.root.push(wrapEl("c:barDir", chartAttr({ val: options.barDirection })));
423
- this.root.push(wrapEl("c:grouping", chartAttr({ val: "clustered" })));
424
- for (let i = 0; i < options.series.length; i++) this.root.push(new Bar3DSeries(i, options.series[i], options.categories));
425
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
426
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
427
- this.root.push(wrapEl("c:axId", chartAttr({ val: 30 })));
428
- }
429
- };
430
- var Bar3DSeries = class extends XmlComponent {
431
- constructor(index, series, categories) {
432
- super("c:ser");
433
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
434
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
435
- this.root.push(new SeriesTx$10(series.name));
436
- this.root.push(new EmptyElement("c:spPr"));
437
- this.root.push(new SeriesCat$7(categories));
438
- this.root.push(new SeriesVal$8(series.values));
439
- }
440
- };
441
- var SeriesTx$10 = class extends XmlComponent {
442
- constructor(name) {
443
- super("c:tx");
444
- this.root.push(createStrRef$1(name));
445
- }
446
- };
447
- var SeriesCat$7 = class extends XmlComponent {
448
- constructor(categories) {
449
- super("c:cat");
450
- this.root.push(createStrRef$1(categories));
451
- }
452
- };
453
- var SeriesVal$8 = class extends XmlComponent {
454
- constructor(values) {
455
- super("c:val");
456
- this.root.push(createNumRef$1(values));
457
- }
458
- };
459
- //#endregion
460
- //#region src/chart/chart-types/bubble-chart.ts
461
- var BubbleChart = class extends XmlComponent {
462
- constructor(options) {
463
- super("c:bubbleChart");
464
- this.root.push(wrapEl("c:varyColors", chartAttr({ val: true })));
465
- for (let i = 0; i < options.series.length; i++) this.root.push(new BubbleSeries(i, options.series[i]));
466
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
467
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
468
- }
469
- };
470
- var BubbleSeries = class extends XmlComponent {
471
- constructor(index, series) {
472
- super("c:ser");
473
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
474
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
475
- this.root.push(new SeriesTx$9(series.name));
476
- this.root.push(new EmptyElement("c:spPr"));
477
- this.root.push(new SeriesXValues(series.xValues));
478
- this.root.push(new SeriesYValues(series.yValues));
479
- this.root.push(new SeriesBubbleSize(series.bubbleSize));
480
- }
481
- };
482
- var SeriesTx$9 = class extends XmlComponent {
483
- constructor(name) {
484
- super("c:tx");
485
- this.root.push(createStrRef(name));
486
- }
487
- };
488
- const createStrRef = (value) => new class extends XmlComponent {
489
- constructor() {
490
- super("c:strRef");
491
- this.root.push(new EmptyElement("c:f"));
492
- this.root.push(new StrCache(value));
493
- }
494
- }();
495
- var StrCache = class extends XmlComponent {
496
- constructor(value) {
497
- super("c:strCache");
498
- this.root.push(wrapEl("c:ptCount", chartAttr({ val: 1 })));
499
- this.root.push(new StrPt(0, value));
500
- }
501
- };
502
- var StrPt = class extends XmlComponent {
503
- constructor(index, value) {
504
- super("c:pt");
505
- this.root.push(chartAttr({ idx: index }));
506
- this.root.push(new StringValue("c:v", value));
507
- }
508
- };
509
- var StringValue = class extends XmlComponent {
510
- constructor(name, val) {
511
- super(name);
512
- this.root.push(val);
513
- }
514
- };
515
- var SeriesXValues = class extends XmlComponent {
516
- constructor(values) {
517
- super("c:xVal");
518
- this.root.push(createNumRef(values));
519
- }
520
- };
521
- var SeriesYValues = class extends XmlComponent {
522
- constructor(values) {
523
- super("c:yVal");
524
- this.root.push(createNumRef(values));
525
- }
526
- };
527
- var SeriesBubbleSize = class extends XmlComponent {
528
- constructor(values) {
529
- super("c:bubbleSize");
530
- this.root.push(createNumRef(values));
531
- }
532
- };
533
- const createNumRef = (values) => new class extends XmlComponent {
534
- constructor() {
535
- super("c:numRef");
536
- this.root.push(new EmptyElement("c:f"));
537
- this.root.push(new NumCache(values));
538
- }
539
- }();
540
- var NumCache = class extends XmlComponent {
541
- constructor(values) {
542
- super("c:numCache");
543
- this.root.push(new FormatCode("General"));
544
- this.root.push(wrapEl("c:ptCount", chartAttr({ val: values.length })));
545
- for (let i = 0; i < values.length; i++) this.root.push(new NumPt(i, values[i]));
546
- }
547
- };
548
- var NumPt = class extends XmlComponent {
549
- constructor(index, value) {
550
- super("c:pt");
551
- this.root.push(chartAttr({ idx: index }));
552
- this.root.push(new StringValue("c:v", String(value)));
553
- }
554
- };
555
- var FormatCode = class extends XmlComponent {
556
- constructor(code) {
557
- super("c:formatCode");
558
- this.root.push(code);
559
- }
560
- };
561
- //#endregion
562
- //#region src/chart/chart-types/doughnut-chart.ts
563
- var DoughnutChart = class extends XmlComponent {
564
- constructor(options) {
565
- super("c:doughnutChart");
566
- this.root.push(wrapEl("c:varyColors", chartAttr({ val: true })));
567
- if (options.holeSize !== void 0) this.root.push(wrapEl("c:firstSliceAng", chartAttr({ val: 0 })));
568
- for (let i = 0; i < options.series.length; i++) this.root.push(new DoughnutSeries(i, options.series[i], options.categories));
569
- }
570
- };
571
- var DoughnutSeries = class extends XmlComponent {
572
- constructor(index, series, categories) {
573
- super("c:ser");
574
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
575
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
576
- this.root.push(new SeriesTx$8(series.name));
577
- this.root.push(new EmptyElement("c:spPr"));
578
- this.root.push(new SeriesCat$6(categories));
579
- this.root.push(new SeriesVal$7(series.values));
580
- }
581
- };
582
- var SeriesTx$8 = class extends XmlComponent {
583
- constructor(name) {
584
- super("c:tx");
585
- this.root.push(createStrRef$1(name));
586
- }
587
- };
588
- var SeriesCat$6 = class extends XmlComponent {
589
- constructor(categories) {
590
- super("c:cat");
591
- this.root.push(createStrRef$1(categories));
592
- }
593
- };
594
- var SeriesVal$7 = class extends XmlComponent {
595
- constructor(values) {
596
- super("c:val");
597
- this.root.push(createNumRef$1(values));
598
- }
599
- };
600
- //#endregion
601
- //#region src/chart/chart-types/line-chart.ts
602
- var LineChart = class extends XmlComponent {
603
- constructor(options) {
604
- super("c:lineChart");
605
- this.root.push(wrapEl("c:grouping", chartAttr({ val: "standard" })));
606
- for (let i = 0; i < options.series.length; i++) this.root.push(new LineSeries(i, options.series[i], options.categories));
607
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
608
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
609
- }
610
- };
611
- var LineSeries = class extends XmlComponent {
612
- constructor(index, series, categories) {
613
- super("c:ser");
614
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
615
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
616
- this.root.push(new SeriesTx$7(series.name));
617
- this.root.push(new EmptyElement("c:spPr"));
618
- if (series.dataLabels) this.root.push(new DataLabels(series.dataLabels));
619
- if (series.trendlines) for (const tl of series.trendlines) this.root.push(new Trendline(tl));
620
- if (series.errorBars) this.root.push(new ErrorBars(series.errorBars));
621
- this.root.push(new SeriesCat$5(categories));
622
- this.root.push(new SeriesVal$6(series.values));
623
- }
624
- };
625
- var SeriesTx$7 = class extends XmlComponent {
626
- constructor(name) {
627
- super("c:tx");
628
- this.root.push(createStrRef$1(name));
629
- }
630
- };
631
- var SeriesCat$5 = class extends XmlComponent {
632
- constructor(categories) {
633
- super("c:cat");
634
- this.root.push(createStrRef$1(categories));
635
- }
636
- };
637
- var SeriesVal$6 = class extends XmlComponent {
638
- constructor(values) {
639
- super("c:val");
640
- this.root.push(createNumRef$1(values));
641
- }
642
- };
643
- //#endregion
644
- //#region src/chart/chart-types/line3d-chart.ts
645
- var Line3DChart = class extends XmlComponent {
646
- constructor(options) {
647
- super("c:line3DChart");
648
- this.root.push(wrapEl("c:grouping", chartAttr({ val: "standard" })));
649
- for (let i = 0; i < options.series.length; i++) this.root.push(new Line3DSeries(i, options.series[i], options.categories));
650
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
651
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
652
- this.root.push(wrapEl("c:axId", chartAttr({ val: 30 })));
653
- }
654
- };
655
- var Line3DSeries = class extends XmlComponent {
656
- constructor(index, series, categories) {
657
- super("c:ser");
658
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
659
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
660
- this.root.push(new SeriesTx$6(series.name));
661
- this.root.push(new EmptyElement("c:spPr"));
662
- this.root.push(new SeriesCat$4(categories));
663
- this.root.push(new SeriesVal$5(series.values));
664
- }
665
- };
666
- var SeriesTx$6 = class extends XmlComponent {
667
- constructor(name) {
668
- super("c:tx");
669
- this.root.push(createStrRef$1(name));
670
- }
671
- };
672
- var SeriesCat$4 = class extends XmlComponent {
673
- constructor(categories) {
674
- super("c:cat");
675
- this.root.push(createStrRef$1(categories));
676
- }
677
- };
678
- var SeriesVal$5 = class extends XmlComponent {
679
- constructor(values) {
680
- super("c:val");
681
- this.root.push(createNumRef$1(values));
682
- }
683
- };
684
- //#endregion
685
- //#region src/chart/chart-types/pie-chart.ts
686
- var PieChart = class extends XmlComponent {
687
- constructor(options) {
688
- super("c:pieChart");
689
- this.root.push(wrapEl("c:varyColors", chartAttr({ val: true })));
690
- for (let i = 0; i < options.series.length; i++) this.root.push(new PieSeries(i, options.series[i], options.categories));
691
- }
692
- };
693
- var PieSeries = class extends XmlComponent {
694
- constructor(index, series, categories) {
695
- super("c:ser");
696
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
697
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
698
- this.root.push(new SeriesTx$5(series.name));
699
- this.root.push(new EmptyElement("c:spPr"));
700
- this.root.push(new SeriesCat$3(categories));
701
- this.root.push(new SeriesVal$4(series.values));
702
- }
703
- };
704
- var SeriesTx$5 = class extends XmlComponent {
705
- constructor(name) {
706
- super("c:tx");
707
- this.root.push(createStrRef$1(name));
708
- }
709
- };
710
- var SeriesCat$3 = class extends XmlComponent {
711
- constructor(categories) {
712
- super("c:cat");
713
- this.root.push(createStrRef$1(categories));
714
- }
715
- };
716
- var SeriesVal$4 = class extends XmlComponent {
717
- constructor(values) {
718
- super("c:val");
719
- this.root.push(createNumRef$1(values));
720
- }
721
- };
722
- //#endregion
723
- //#region src/chart/chart-types/pie3d-chart.ts
724
- var Pie3DChart = class extends XmlComponent {
725
- constructor(options) {
726
- super("c:pie3DChart");
727
- this.root.push(wrapEl("c:varyColors", chartAttr({ val: true })));
728
- for (let i = 0; i < options.series.length; i++) this.root.push(new Pie3DSeries(i, options.series[i], options.categories));
729
- }
730
- };
731
- var Pie3DSeries = class extends XmlComponent {
732
- constructor(index, series, categories) {
733
- super("c:ser");
734
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
735
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
736
- this.root.push(new SeriesTx$4(series.name));
737
- this.root.push(new EmptyElement("c:spPr"));
738
- this.root.push(new SeriesCat$2(categories));
739
- this.root.push(new SeriesVal$3(series.values));
740
- }
741
- };
742
- var SeriesTx$4 = class extends XmlComponent {
743
- constructor(name) {
744
- super("c:tx");
745
- this.root.push(createStrRef$1(name));
746
- }
747
- };
748
- var SeriesCat$2 = class extends XmlComponent {
749
- constructor(categories) {
750
- super("c:cat");
751
- this.root.push(createStrRef$1(categories));
752
- }
753
- };
754
- var SeriesVal$3 = class extends XmlComponent {
755
- constructor(values) {
756
- super("c:val");
757
- this.root.push(createNumRef$1(values));
758
- }
759
- };
760
- //#endregion
761
- //#region src/chart/chart-types/radar-chart.ts
762
- var RadarChart = class extends XmlComponent {
763
- constructor(options) {
764
- super("c:radarChart");
765
- this.root.push(wrapEl("c:radarStyle", chartAttr({ val: options.radarStyle ?? "standard" })));
766
- for (let i = 0; i < options.series.length; i++) this.root.push(new RadarSeries(i, options.series[i], options.categories));
767
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
768
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
769
- }
770
- };
771
- var RadarSeries = class extends XmlComponent {
772
- constructor(index, series, categories) {
773
- super("c:ser");
774
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
775
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
776
- this.root.push(new SeriesTx$3(series.name));
777
- this.root.push(new EmptyElement("c:spPr"));
778
- this.root.push(new SeriesCat$1(categories));
779
- this.root.push(new SeriesVal$2(series.values));
780
- }
781
- };
782
- var SeriesTx$3 = class extends XmlComponent {
783
- constructor(name) {
784
- super("c:tx");
785
- this.root.push(createStrRef$1(name));
786
- }
787
- };
788
- var SeriesCat$1 = class extends XmlComponent {
789
- constructor(categories) {
790
- super("c:cat");
791
- this.root.push(createStrRef$1(categories));
792
- }
793
- };
794
- var SeriesVal$2 = class extends XmlComponent {
795
- constructor(values) {
796
- super("c:val");
797
- this.root.push(createNumRef$1(values));
798
- }
799
- };
800
- //#endregion
801
- //#region src/chart/chart-types/scatter-chart.ts
802
- var ScatterChart = class extends XmlComponent {
803
- constructor(options) {
804
- super("c:scatterChart");
805
- this.root.push(wrapEl("c:scatterStyle", chartAttr({ val: "line" })));
806
- for (let i = 0; i < options.series.length; i++) this.root.push(new ScatterSeries(i, options.series[i], options.categories));
807
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
808
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
809
- }
810
- };
811
- var ScatterSeries = class extends XmlComponent {
812
- constructor(index, series, categories) {
813
- super("c:ser");
814
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
815
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
816
- this.root.push(new SeriesTx$2(series.name));
817
- this.root.push(new EmptyElement("c:spPr"));
818
- if (series.dataLabels) this.root.push(new DataLabels(series.dataLabels));
819
- if (series.trendlines) for (const tl of series.trendlines) this.root.push(new Trendline(tl));
820
- if (series.errorBars) this.root.push(new ErrorBars(series.errorBars));
821
- this.root.push(new SeriesXVal(categories));
822
- this.root.push(new SeriesYVal(series.values));
823
- }
824
- };
825
- var SeriesTx$2 = class extends XmlComponent {
826
- constructor(name) {
827
- super("c:tx");
828
- this.root.push(createStrRef$1(name));
829
- }
830
- };
831
- var SeriesXVal = class extends XmlComponent {
832
- constructor(categories) {
833
- super("c:xVal");
834
- this.root.push(createStrRef$1(categories));
835
- }
836
- };
837
- var SeriesYVal = class extends XmlComponent {
838
- constructor(values) {
839
- super("c:yVal");
840
- this.root.push(createNumRef$1(values));
841
- }
842
- };
843
- //#endregion
844
- //#region src/chart/chart-types/stock-chart.ts
845
- var StockChart = class extends XmlComponent {
846
- constructor(options) {
847
- super("c:stockChart");
848
- for (let i = 0; i < options.series.length; i++) this.root.push(new StockSeries(i, options.series[i]));
849
- this.root.push(new DropLines());
850
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
851
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
852
- }
853
- };
854
- var StockSeries = class extends XmlComponent {
855
- constructor(index, series) {
856
- super("c:ser");
857
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
858
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
859
- this.root.push(new SeriesTx$1(series.name));
860
- this.root.push(new EmptyElement("c:spPr"));
861
- this.root.push(new SeriesVal$1(series.values));
862
- }
863
- };
864
- var SeriesTx$1 = class extends XmlComponent {
865
- constructor(name) {
866
- super("c:tx");
867
- this.root.push(createStrRef$1(name));
868
- }
869
- };
870
- var SeriesVal$1 = class extends XmlComponent {
871
- constructor(values) {
872
- super("c:val");
873
- this.root.push(createNumRef$1(values));
874
- }
875
- };
876
- var DropLines = class extends XmlComponent {
877
- constructor() {
878
- super("c:dropLines");
879
- this.root.push(new EmptyElement("c:spPr"));
880
- }
881
- };
882
- //#endregion
883
- //#region src/chart/chart-types/surface-chart.ts
884
- var SurfaceChart = class extends XmlComponent {
885
- constructor(options) {
886
- super("c:surfaceChart");
887
- if (options.wireframe) this.root.push(wrapEl("c:wireframe", chartAttr({ val: true })));
888
- for (let i = 0; i < options.series.length; i++) this.root.push(new SurfaceSeries(i, options.series[i], options.categories));
889
- this.root.push(wrapEl("c:axId", chartAttr({ val: 10 })));
890
- this.root.push(wrapEl("c:axId", chartAttr({ val: 20 })));
891
- this.root.push(wrapEl("c:axId", chartAttr({ val: 30 })));
892
- }
893
- };
894
- var SurfaceSeries = class extends XmlComponent {
895
- constructor(index, series, categories) {
896
- super("c:ser");
897
- this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
898
- this.root.push(wrapEl("c:order", chartAttr({ val: index })));
899
- this.root.push(new SeriesTx(series.name));
900
- this.root.push(new EmptyElement("c:spPr"));
901
- this.root.push(new SeriesCat(categories));
902
- this.root.push(new SeriesVal(series.values));
903
- }
904
- };
905
- var SeriesTx = class extends XmlComponent {
906
- constructor(name) {
907
- super("c:tx");
908
- this.root.push(createStrRef$1(name));
909
- }
910
- };
911
- var SeriesCat = class extends XmlComponent {
912
- constructor(categories) {
913
- super("c:cat");
914
- this.root.push(createStrRef$1(categories));
915
- }
916
- };
917
- var SeriesVal = class extends XmlComponent {
918
- constructor(values) {
919
- super("c:val");
920
- this.root.push(createNumRef$1(values));
921
- }
922
- };
923
- //#endregion
924
- //#region src/chart/create-chart-type.ts
925
- const is3D = (opts) => opts.threeD === true;
926
- const createChartType = (options) => {
927
- if (options.type === "bubble") return new BubbleChart({ series: options.series });
928
- const opts = options;
929
- switch (opts.type) {
930
- case "column":
931
- case "bar": return is3D(opts) ? new Bar3DChart({
932
- barDirection: opts.type === "column" ? "col" : "bar",
933
- categories: opts.categories,
934
- series: opts.series
935
- }) : new BarChart({
936
- barDirection: opts.type === "column" ? "col" : "bar",
937
- categories: opts.categories,
938
- series: opts.series
939
- });
940
- case "line": return is3D(opts) ? new Line3DChart({
941
- categories: opts.categories,
942
- series: opts.series
943
- }) : new LineChart({
944
- categories: opts.categories,
945
- series: opts.series
946
- });
947
- case "pie": return is3D(opts) ? new Pie3DChart({
948
- categories: opts.categories,
949
- series: opts.series
950
- }) : new PieChart({
951
- categories: opts.categories,
952
- series: opts.series
953
- });
954
- case "area": return is3D(opts) ? new Area3DChart({
955
- categories: opts.categories,
956
- series: opts.series
957
- }) : new AreaChart({
958
- categories: opts.categories,
959
- series: opts.series
960
- });
961
- case "scatter": return new ScatterChart({
962
- categories: opts.categories,
963
- series: opts.series
964
- });
965
- case "doughnut": return new DoughnutChart({
966
- categories: opts.categories,
967
- series: opts.series
968
- });
969
- case "radar": return new RadarChart({
970
- categories: opts.categories,
971
- series: opts.series
972
- });
973
- case "stock": return new StockChart({
974
- categories: opts.categories,
975
- series: opts.series
976
- });
977
- case "surface": return new SurfaceChart({
978
- categories: opts.categories,
979
- series: opts.series
980
- });
981
- default: throw new Error(`Unsupported chart type: ${options.type}`);
982
- }
983
- };
984
- //#endregion
985
- //#region src/chart/title.ts
986
- var ChartTitle = class extends XmlComponent {
987
- constructor(title) {
988
- super("c:title");
989
- this.root.push(new TitleTx(title));
990
- this.root.push(new TitleOverlay());
991
- }
992
- };
993
- var TitleTx = class extends XmlComponent {
994
- constructor(title) {
995
- super("c:tx");
996
- const rich = new class extends XmlComponent {
997
- constructor() {
998
- super("c:rich");
999
- }
1000
- }();
1001
- rich["root"].push(new class extends XmlComponent {
1002
- constructor() {
1003
- super("a:bodyPr");
1004
- }
1005
- }());
1006
- rich["root"].push(new class extends XmlComponent {
1007
- constructor() {
1008
- super("a:lstStyle");
1009
- }
1010
- }());
1011
- const p = new class extends XmlComponent {
1012
- constructor() {
1013
- super("a:p");
1014
- }
1015
- }();
1016
- const r = new class extends XmlComponent {
1017
- constructor() {
1018
- super("a:r");
1019
- }
1020
- }();
1021
- r["root"].push(new class extends XmlComponent {
1022
- constructor() {
1023
- super("a:t");
1024
- this.root.push(title);
1025
- }
1026
- }());
1027
- p["root"].push(r);
1028
- rich["root"].push(p);
1029
- this.root.push(rich);
1030
- }
1031
- };
1032
- var TitleOverlay = class extends XmlComponent {
1033
- constructor() {
1034
- super("c:overlay");
1035
- this.root.push(chartAttr({ val: 0 }));
1036
- }
1037
- };
1038
- //#endregion
1039
- //#region src/chart/chart-space.ts
1040
- /**
1041
- * ChartSpace — root element for chart XML parts (c:chartSpace).
1042
- *
1043
- * Full XSD-compliant implementation with all optional elements.
1044
- *
1045
- * @module
1046
- */
1047
- /**
1048
- * c:chartSpace — root element for chart XML parts.
1049
- */
1050
- var ChartSpace = class extends XmlComponent {
1051
- constructor(options) {
1052
- super("c:chartSpace");
1053
- this.root.push(chartAttr({
1054
- "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
1055
- "xmlns:c": "http://schemas.openxmlformats.org/drawingml/2006/chart",
1056
- "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
1057
- }));
1058
- this.root.push(wrapEl("c:date1904", chartAttr({ val: 0 })));
1059
- this.root.push(wrapEl("c:lang", chartAttr({ val: "en-US" })));
1060
- this.root.push(wrapEl("c:roundedCorners", chartAttr({ val: 0 })));
1061
- if (options.style !== void 0) this.root.push(new ChartStyle(options.style));
1062
- const chart = new ChartContainer();
1063
- if (options.title) chart["root"].push(new ChartTitle(options.title));
1064
- chart["root"].push(wrapEl("c:autoTitleDeleted", chartAttr({ val: 0 })));
1065
- const plotArea = new PlotArea();
1066
- plotArea["root"].push(new BuilderElement({ name: "c:layout" }));
1067
- plotArea["root"].push(createChartType({
1068
- categories: options.categories ?? [],
1069
- series: options.series,
1070
- type: options.type,
1071
- threeD: options.threeD
1072
- }));
1073
- if (!new Set(["pie", "doughnut"]).has(options.type)) if (options.type === "scatter" || options.type === "bubble") {
1074
- plotArea["root"].push(new ValAx(10, 20));
1075
- plotArea["root"].push(new ValAx(20, 10));
1076
- } else if (options.type === "stock") {
1077
- plotArea["root"].push(new CatAx(10, 20));
1078
- plotArea["root"].push(new ValAx(20, 10));
1079
- } else if (options.type === "surface") {
1080
- plotArea["root"].push(new CatAx(10, 20));
1081
- plotArea["root"].push(new ValAx(20, 10));
1082
- plotArea["root"].push(new SerAx(30, 10));
1083
- } else {
1084
- plotArea["root"].push(new CatAx(10, 20));
1085
- plotArea["root"].push(new ValAx(20, 10));
1086
- if (options.threeD) plotArea["root"].push(new CatAx(30, 10));
1087
- }
1088
- chart["root"].push(plotArea);
1089
- if (options.showLegend !== false) chart["root"].push(createLegend());
1090
- this.root.push(chart);
1091
- this.root.push(createNoFillSpPr());
1092
- this.root.push(createChartTxPr());
1093
- }
1094
- };
1095
- var ChartContainer = class extends XmlComponent {
1096
- constructor() {
1097
- super("c:chart");
1098
- }
1099
- };
1100
- var PlotArea = class extends XmlComponent {
1101
- constructor() {
1102
- super("c:plotArea");
1103
- }
1104
- };
1105
- function createLegend() {
1106
- const legend = new class extends XmlComponent {
1107
- constructor() {
1108
- super("c:legend");
1109
- }
1110
- }();
1111
- legend["root"].push(wrapEl("c:legendPos", chartAttr({ val: "b" })));
1112
- legend["root"].push(new BuilderElement({ name: "c:layout" }));
1113
- legend["root"].push(wrapEl("c:overlay", chartAttr({ val: 0 })));
1114
- legend["root"].push(createNoFillSpPr());
1115
- legend["root"].push(createTxPr());
1116
- return legend;
1117
- }
1118
- function createNoFillSpPr() {
1119
- const spPr = new class extends XmlComponent {
1120
- constructor() {
1121
- super("c:spPr");
1122
- }
1123
- }();
1124
- spPr["root"].push(new class extends XmlComponent {
1125
- constructor() {
1126
- super("a:noFill");
1127
- }
1128
- }());
1129
- spPr["root"].push(new class extends XmlComponent {
1130
- constructor() {
1131
- super("a:ln");
1132
- this.root.push(new class extends XmlComponent {
1133
- constructor() {
1134
- super("a:noFill");
1135
- }
1136
- }());
1137
- }
1138
- }());
1139
- spPr["root"].push(new BuilderElement({ name: "a:effectLst" }));
1140
- return spPr;
1141
- }
1142
- function createChartTxPr() {
1143
- const txPr = new class extends XmlComponent {
1144
- constructor() {
1145
- super("c:txPr");
1146
- }
1147
- }();
1148
- txPr["root"].push(new BuilderElement({ name: "a:bodyPr" }));
1149
- txPr["root"].push(new BuilderElement({ name: "a:lstStyle" }));
1150
- txPr["root"].push(createTextParagraph());
1151
- return txPr;
1152
- }
1153
- function createTxPr() {
1154
- const txPr = new class extends XmlComponent {
1155
- constructor() {
1156
- super("c:txPr");
1157
- }
1158
- }();
1159
- txPr["root"].push(createBodyPr());
1160
- txPr["root"].push(new BuilderElement({ name: "a:lstStyle" }));
1161
- txPr["root"].push(createTextParagraph());
1162
- return txPr;
1163
- }
1164
- function createBodyPr() {
1165
- return new BuilderElement({
1166
- name: "a:bodyPr",
1167
- attributes: {
1168
- rot: {
1169
- key: "rot",
1170
- value: "0"
1171
- },
1172
- spcFirstLastPara: {
1173
- key: "spcFirstLastPara",
1174
- value: "1"
1175
- },
1176
- vertOverflow: {
1177
- key: "vertOverflow",
1178
- value: "ellipsis"
1179
- },
1180
- vert: {
1181
- key: "vert",
1182
- value: "horz"
1183
- },
1184
- wrap: {
1185
- key: "wrap",
1186
- value: "square"
1187
- },
1188
- anchor: {
1189
- key: "anchor",
1190
- value: "ctr"
1191
- },
1192
- anchorCtr: {
1193
- key: "anchorCtr",
1194
- value: "1"
1195
- }
1196
- }
1197
- });
1198
- }
1199
- function createTextParagraph() {
1200
- const p = new class extends XmlComponent {
1201
- constructor() {
1202
- super("a:p");
1203
- }
1204
- }();
1205
- const pPr = new class extends XmlComponent {
1206
- constructor() {
1207
- super("a:pPr");
1208
- }
1209
- }();
1210
- pPr["root"].push(new BuilderElement({ name: "a:defRPr" }));
1211
- p["root"].push(pPr);
1212
- p["root"].push(new BuilderElement({
1213
- name: "a:endParaRPr",
1214
- attributes: { lang: {
1215
- key: "lang",
1216
- value: "en-US"
1217
- } }
1218
- }));
1219
- return p;
1220
- }
1221
- var ChartStyle = class extends XmlComponent {
1222
- constructor(val) {
1223
- super("c:style");
1224
- this.root.push(chartAttr({ val: String(val) }));
1225
- }
1226
- };
1227
- //#endregion
1228
- //#region src/chart/chart-collection.ts
1229
- var ChartCollection = class {
1230
- map;
1231
- constructor() {
1232
- this.map = /* @__PURE__ */ new Map();
1233
- }
1234
- addChart(key, chartData) {
1235
- this.map.set(key, chartData);
1236
- }
1237
- get array() {
1238
- return [...this.map.values()];
1239
- }
1240
- };
1241
- //#endregion
1242
- export { createNumRef$1 as A, ErrorValueType as C, View3D as D, TrendlineType as E, CatAx as M, SerAx as N, Area3DChart as O, ValAx as P, ErrorBars as S, Trendline as T, DataLabelPosition as _, SurfaceChart as a, ErrorBarDirection as b, RadarChart as c, Line3DChart as d, LineChart as f, BarChart as g, Bar3DChart as h, createChartType as i, createStrRef$1 as j, AreaChart as k, Pie3DChart as l, BubbleChart as m, ChartSpace as n, StockChart as o, DoughnutChart as p, ChartTitle as r, ScatterChart as s, ChartCollection as t, PieChart as u, DataLabels as v, TimeUnit as w, ErrorBarType as x, DateAx as y };