@sunertech/docx 10.0.4 → 10.0.6
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/dist/index.cjs +28 -30
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.iife.js +28 -30
- package/dist/index.mjs +28 -30
- package/dist/index.umd.cjs +28 -30
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17213,8 +17213,8 @@ class PictureOptions extends XmlComponent {
|
|
|
17213
17213
|
}
|
|
17214
17214
|
const SerieColors = ["accent1", "accent3", "accent4", "accent5", "accent6"];
|
|
17215
17215
|
const addSeriesSharedOptions = (root, { index, refOffset, order, name, shape }) => {
|
|
17216
|
-
root.push(new NumberValueElement("c:idx", index, ""));
|
|
17217
|
-
root.push(new NumberValueElement("c:order", order != null ? order : index, ""));
|
|
17216
|
+
root.push(new NumberValueElement("c:idx", refOffset - 2 + index, ""));
|
|
17217
|
+
root.push(new NumberValueElement("c:order", order != null ? order : refOffset - 2 + index, ""));
|
|
17218
17218
|
if (name !== void 0) {
|
|
17219
17219
|
root.push(new TextSource("c:tx", { formula: `Sheet1!$A$${refOffset + index}`, values: [name] }));
|
|
17220
17220
|
}
|
|
@@ -17381,8 +17381,8 @@ var LabelAlign = /* @__PURE__ */ ((LabelAlign2) => {
|
|
|
17381
17381
|
})(LabelAlign || {});
|
|
17382
17382
|
class CategoryAxis extends XmlComponent {
|
|
17383
17383
|
constructor(_m) {
|
|
17384
|
-
var _n = _m, { auto, label,
|
|
17385
|
-
var _a, _b, _c, _d;
|
|
17384
|
+
var _n = _m, { auto, label, extensionList } = _n, options = __objRest(_n, ["auto", "label", "extensionList"]);
|
|
17385
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17386
17386
|
super("c:catAx");
|
|
17387
17387
|
addAxisSharedOptions(this.root, options);
|
|
17388
17388
|
this.root.push(new BooleanElement("c:auto", auto != null ? auto : true, ""));
|
|
@@ -17392,13 +17392,13 @@ class CategoryAxis extends XmlComponent {
|
|
|
17392
17392
|
typeof label.offset === "string" ? new StringValueElement("c:lblOffset", label.offset, "") : new NumberValueElement("c:lblOffset", label.offset, "")
|
|
17393
17393
|
);
|
|
17394
17394
|
}
|
|
17395
|
-
if (((_b = tick == null ? void 0 :
|
|
17396
|
-
this.root.push(new NumberValueElement("c:tickLblSkip", tick.label.skip, ""));
|
|
17395
|
+
if (((_c = (_b = options.tick) == null ? void 0 : _b.label) == null ? void 0 : _c.skip) !== void 0) {
|
|
17396
|
+
this.root.push(new NumberValueElement("c:tickLblSkip", options.tick.label.skip, ""));
|
|
17397
17397
|
}
|
|
17398
|
-
if (((
|
|
17399
|
-
this.root.push(new NumberValueElement("c:tickMarkSkip", tick.mark.skip, ""));
|
|
17398
|
+
if (((_e = (_d = options.tick) == null ? void 0 : _d.mark) == null ? void 0 : _e.skip) !== void 0) {
|
|
17399
|
+
this.root.push(new NumberValueElement("c:tickMarkSkip", options.tick.mark.skip, ""));
|
|
17400
17400
|
}
|
|
17401
|
-
this.root.push(new BooleanElement("c:noMultiLvlLbl", (
|
|
17401
|
+
this.root.push(new BooleanElement("c:noMultiLvlLbl", (_f = label == null ? void 0 : label.noMultiLevel) != null ? _f : true, ""));
|
|
17402
17402
|
if (extensionList) {
|
|
17403
17403
|
this.root.push(new ExtensionList(extensionList));
|
|
17404
17404
|
}
|
|
@@ -18601,20 +18601,6 @@ class PlotArea extends XmlComponent {
|
|
|
18601
18601
|
if (area3DChart) {
|
|
18602
18602
|
this.root.push(new Area3DChart(area3DChart));
|
|
18603
18603
|
}
|
|
18604
|
-
if (lineChart) {
|
|
18605
|
-
this.root.push(
|
|
18606
|
-
new LineChart(__spreadProps(__spreadValues({
|
|
18607
|
-
categories
|
|
18608
|
-
}, lineChart), {
|
|
18609
|
-
refOffset,
|
|
18610
|
-
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18611
|
-
}))
|
|
18612
|
-
);
|
|
18613
|
-
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18614
|
-
}
|
|
18615
|
-
if (line3DChart) {
|
|
18616
|
-
this.root.push(new Line3DChart(line3DChart));
|
|
18617
|
-
}
|
|
18618
18604
|
if (stockChart) {
|
|
18619
18605
|
this.root.push(new StockChart(stockChart));
|
|
18620
18606
|
}
|
|
@@ -18659,6 +18645,20 @@ class PlotArea extends XmlComponent {
|
|
|
18659
18645
|
if (bubbleChart) {
|
|
18660
18646
|
this.root.push(new BubbleChart(bubbleChart));
|
|
18661
18647
|
}
|
|
18648
|
+
if (lineChart) {
|
|
18649
|
+
this.root.push(
|
|
18650
|
+
new LineChart(__spreadProps(__spreadValues({
|
|
18651
|
+
categories
|
|
18652
|
+
}, lineChart), {
|
|
18653
|
+
refOffset,
|
|
18654
|
+
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18655
|
+
}))
|
|
18656
|
+
);
|
|
18657
|
+
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18658
|
+
}
|
|
18659
|
+
if (line3DChart) {
|
|
18660
|
+
this.root.push(new Line3DChart(line3DChart));
|
|
18661
|
+
}
|
|
18662
18662
|
if (valueAxis || barChart) {
|
|
18663
18663
|
this.root.push(
|
|
18664
18664
|
new ValueAxis(__spreadProps(__spreadValues({
|
|
@@ -18771,7 +18771,7 @@ class ChartSpaceAttributes extends XmlAttributeComponent {
|
|
|
18771
18771
|
}
|
|
18772
18772
|
class ChartSpace extends XmlComponent {
|
|
18773
18773
|
constructor(_y) {
|
|
18774
|
-
var _z = _y, { date1904, roundedCorners,
|
|
18774
|
+
var _z = _y, { date1904, roundedCorners, spaceShape } = _z, options = __objRest(_z, ["date1904", "roundedCorners", "spaceShape"]);
|
|
18775
18775
|
super("c:chartSpace");
|
|
18776
18776
|
__publicField(this, "options");
|
|
18777
18777
|
this.options = options;
|
|
@@ -18784,9 +18784,7 @@ class ChartSpace extends XmlComponent {
|
|
|
18784
18784
|
);
|
|
18785
18785
|
this.root.push(new BooleanElement("c:date1904", date1904 != null ? date1904 : true, ""));
|
|
18786
18786
|
this.root.push(new BooleanElement("c:roundedCorners", roundedCorners != null ? roundedCorners : false, ""));
|
|
18787
|
-
|
|
18788
|
-
this.root.push(new ShapeProperties("c:spPr", shapeProperties));
|
|
18789
|
-
}
|
|
18787
|
+
this.root.push(new ShapeProperties("c:spPr", __spreadValues({ type: "noFill", outline: { type: "noFill" } }, spaceShape)));
|
|
18790
18788
|
this.root.push(new ExternalData({ id: "rId1" }));
|
|
18791
18789
|
this.root.push(new Chart$1(options));
|
|
18792
18790
|
}
|
|
@@ -18798,10 +18796,10 @@ class ChartSpace extends XmlComponent {
|
|
|
18798
18796
|
return [
|
|
18799
18797
|
[
|
|
18800
18798
|
"",
|
|
18801
|
-
...this.options.categories || ((_a = this.options.
|
|
18799
|
+
...this.options.categories || ((_a = this.options.barChart) == null ? void 0 : _a.categories) || ((_b = this.options.lineChart) == null ? void 0 : _b.categories) || ((_d = (_c = this.options.barChart) == null ? void 0 : _c.series[0]) == null ? void 0 : _d.categories) || ((_g = (_f = (_e = this.options.lineChart) == null ? void 0 : _e.series) == null ? void 0 : _f[0]) == null ? void 0 : _g.categories) || []
|
|
18802
18800
|
],
|
|
18803
|
-
...(((_h = this.options.
|
|
18804
|
-
...(((_i = this.options.
|
|
18801
|
+
...(((_h = this.options.barChart) == null ? void 0 : _h.series) || []).map((serie) => [serie.name || "", ...serie.values || []]),
|
|
18802
|
+
...(((_i = this.options.lineChart) == null ? void 0 : _i.series) || []).map((serie) => [serie.name || "", ...serie.values || []])
|
|
18805
18803
|
];
|
|
18806
18804
|
}
|
|
18807
18805
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -401,14 +401,14 @@ declare class Charts {
|
|
|
401
401
|
|
|
402
402
|
declare class ChartSpace extends XmlComponent {
|
|
403
403
|
readonly options: ChartOptions;
|
|
404
|
-
constructor({ date1904, roundedCorners,
|
|
404
|
+
constructor({ date1904, roundedCorners, spaceShape, ...options }: ChartSpaceOptions);
|
|
405
405
|
get dataTable(): (number | string)[][];
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
declare type ChartSpaceOptions = {
|
|
409
409
|
readonly date1904?: boolean;
|
|
410
410
|
readonly roundedCorners?: boolean;
|
|
411
|
-
readonly
|
|
411
|
+
readonly spaceShape?: IShapePropertiesOptions;
|
|
412
412
|
} & ChartOptions;
|
|
413
413
|
|
|
414
414
|
declare class ChartWrapper {
|
package/dist/index.d.ts
CHANGED
|
@@ -401,14 +401,14 @@ declare class Charts {
|
|
|
401
401
|
|
|
402
402
|
declare class ChartSpace extends XmlComponent {
|
|
403
403
|
readonly options: ChartOptions;
|
|
404
|
-
constructor({ date1904, roundedCorners,
|
|
404
|
+
constructor({ date1904, roundedCorners, spaceShape, ...options }: ChartSpaceOptions);
|
|
405
405
|
get dataTable(): (number | string)[][];
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
declare type ChartSpaceOptions = {
|
|
409
409
|
readonly date1904?: boolean;
|
|
410
410
|
readonly roundedCorners?: boolean;
|
|
411
|
-
readonly
|
|
411
|
+
readonly spaceShape?: IShapePropertiesOptions;
|
|
412
412
|
} & ChartOptions;
|
|
413
413
|
|
|
414
414
|
declare class ChartWrapper {
|
package/dist/index.iife.js
CHANGED
|
@@ -17213,8 +17213,8 @@ var docx = (function(exports) {
|
|
|
17213
17213
|
}
|
|
17214
17214
|
const SerieColors = ["accent1", "accent3", "accent4", "accent5", "accent6"];
|
|
17215
17215
|
const addSeriesSharedOptions = (root, { index, refOffset, order, name, shape }) => {
|
|
17216
|
-
root.push(new NumberValueElement("c:idx", index, ""));
|
|
17217
|
-
root.push(new NumberValueElement("c:order", order != null ? order : index, ""));
|
|
17216
|
+
root.push(new NumberValueElement("c:idx", refOffset - 2 + index, ""));
|
|
17217
|
+
root.push(new NumberValueElement("c:order", order != null ? order : refOffset - 2 + index, ""));
|
|
17218
17218
|
if (name !== void 0) {
|
|
17219
17219
|
root.push(new TextSource("c:tx", { formula: `Sheet1!$A$${refOffset + index}`, values: [name] }));
|
|
17220
17220
|
}
|
|
@@ -17381,8 +17381,8 @@ var docx = (function(exports) {
|
|
|
17381
17381
|
})(LabelAlign || {});
|
|
17382
17382
|
class CategoryAxis extends XmlComponent {
|
|
17383
17383
|
constructor(_m) {
|
|
17384
|
-
var _n = _m, { auto, label,
|
|
17385
|
-
var _a, _b, _c, _d;
|
|
17384
|
+
var _n = _m, { auto, label, extensionList } = _n, options = __objRest(_n, ["auto", "label", "extensionList"]);
|
|
17385
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17386
17386
|
super("c:catAx");
|
|
17387
17387
|
addAxisSharedOptions(this.root, options);
|
|
17388
17388
|
this.root.push(new BooleanElement("c:auto", auto != null ? auto : true, ""));
|
|
@@ -17392,13 +17392,13 @@ var docx = (function(exports) {
|
|
|
17392
17392
|
typeof label.offset === "string" ? new StringValueElement("c:lblOffset", label.offset, "") : new NumberValueElement("c:lblOffset", label.offset, "")
|
|
17393
17393
|
);
|
|
17394
17394
|
}
|
|
17395
|
-
if (((_b = tick == null ? void 0 :
|
|
17396
|
-
this.root.push(new NumberValueElement("c:tickLblSkip", tick.label.skip, ""));
|
|
17395
|
+
if (((_c = (_b = options.tick) == null ? void 0 : _b.label) == null ? void 0 : _c.skip) !== void 0) {
|
|
17396
|
+
this.root.push(new NumberValueElement("c:tickLblSkip", options.tick.label.skip, ""));
|
|
17397
17397
|
}
|
|
17398
|
-
if (((
|
|
17399
|
-
this.root.push(new NumberValueElement("c:tickMarkSkip", tick.mark.skip, ""));
|
|
17398
|
+
if (((_e = (_d = options.tick) == null ? void 0 : _d.mark) == null ? void 0 : _e.skip) !== void 0) {
|
|
17399
|
+
this.root.push(new NumberValueElement("c:tickMarkSkip", options.tick.mark.skip, ""));
|
|
17400
17400
|
}
|
|
17401
|
-
this.root.push(new BooleanElement("c:noMultiLvlLbl", (
|
|
17401
|
+
this.root.push(new BooleanElement("c:noMultiLvlLbl", (_f = label == null ? void 0 : label.noMultiLevel) != null ? _f : true, ""));
|
|
17402
17402
|
if (extensionList) {
|
|
17403
17403
|
this.root.push(new ExtensionList(extensionList));
|
|
17404
17404
|
}
|
|
@@ -18601,20 +18601,6 @@ var docx = (function(exports) {
|
|
|
18601
18601
|
if (area3DChart) {
|
|
18602
18602
|
this.root.push(new Area3DChart(area3DChart));
|
|
18603
18603
|
}
|
|
18604
|
-
if (lineChart) {
|
|
18605
|
-
this.root.push(
|
|
18606
|
-
new LineChart(__spreadProps(__spreadValues({
|
|
18607
|
-
categories
|
|
18608
|
-
}, lineChart), {
|
|
18609
|
-
refOffset,
|
|
18610
|
-
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18611
|
-
}))
|
|
18612
|
-
);
|
|
18613
|
-
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18614
|
-
}
|
|
18615
|
-
if (line3DChart) {
|
|
18616
|
-
this.root.push(new Line3DChart(line3DChart));
|
|
18617
|
-
}
|
|
18618
18604
|
if (stockChart) {
|
|
18619
18605
|
this.root.push(new StockChart(stockChart));
|
|
18620
18606
|
}
|
|
@@ -18659,6 +18645,20 @@ var docx = (function(exports) {
|
|
|
18659
18645
|
if (bubbleChart) {
|
|
18660
18646
|
this.root.push(new BubbleChart(bubbleChart));
|
|
18661
18647
|
}
|
|
18648
|
+
if (lineChart) {
|
|
18649
|
+
this.root.push(
|
|
18650
|
+
new LineChart(__spreadProps(__spreadValues({
|
|
18651
|
+
categories
|
|
18652
|
+
}, lineChart), {
|
|
18653
|
+
refOffset,
|
|
18654
|
+
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18655
|
+
}))
|
|
18656
|
+
);
|
|
18657
|
+
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18658
|
+
}
|
|
18659
|
+
if (line3DChart) {
|
|
18660
|
+
this.root.push(new Line3DChart(line3DChart));
|
|
18661
|
+
}
|
|
18662
18662
|
if (valueAxis || barChart) {
|
|
18663
18663
|
this.root.push(
|
|
18664
18664
|
new ValueAxis(__spreadProps(__spreadValues({
|
|
@@ -18771,7 +18771,7 @@ var docx = (function(exports) {
|
|
|
18771
18771
|
}
|
|
18772
18772
|
class ChartSpace extends XmlComponent {
|
|
18773
18773
|
constructor(_y) {
|
|
18774
|
-
var _z = _y, { date1904, roundedCorners,
|
|
18774
|
+
var _z = _y, { date1904, roundedCorners, spaceShape } = _z, options = __objRest(_z, ["date1904", "roundedCorners", "spaceShape"]);
|
|
18775
18775
|
super("c:chartSpace");
|
|
18776
18776
|
__publicField(this, "options");
|
|
18777
18777
|
this.options = options;
|
|
@@ -18784,9 +18784,7 @@ var docx = (function(exports) {
|
|
|
18784
18784
|
);
|
|
18785
18785
|
this.root.push(new BooleanElement("c:date1904", date1904 != null ? date1904 : true, ""));
|
|
18786
18786
|
this.root.push(new BooleanElement("c:roundedCorners", roundedCorners != null ? roundedCorners : false, ""));
|
|
18787
|
-
|
|
18788
|
-
this.root.push(new ShapeProperties("c:spPr", shapeProperties));
|
|
18789
|
-
}
|
|
18787
|
+
this.root.push(new ShapeProperties("c:spPr", __spreadValues({ type: "noFill", outline: { type: "noFill" } }, spaceShape)));
|
|
18790
18788
|
this.root.push(new ExternalData({ id: "rId1" }));
|
|
18791
18789
|
this.root.push(new Chart$1(options));
|
|
18792
18790
|
}
|
|
@@ -18798,10 +18796,10 @@ var docx = (function(exports) {
|
|
|
18798
18796
|
return [
|
|
18799
18797
|
[
|
|
18800
18798
|
"",
|
|
18801
|
-
...this.options.categories || ((_a = this.options.
|
|
18799
|
+
...this.options.categories || ((_a = this.options.barChart) == null ? void 0 : _a.categories) || ((_b = this.options.lineChart) == null ? void 0 : _b.categories) || ((_d = (_c = this.options.barChart) == null ? void 0 : _c.series[0]) == null ? void 0 : _d.categories) || ((_g = (_f = (_e = this.options.lineChart) == null ? void 0 : _e.series) == null ? void 0 : _f[0]) == null ? void 0 : _g.categories) || []
|
|
18802
18800
|
],
|
|
18803
|
-
...(((_h = this.options.
|
|
18804
|
-
...(((_i = this.options.
|
|
18801
|
+
...(((_h = this.options.barChart) == null ? void 0 : _h.series) || []).map((serie) => [serie.name || "", ...serie.values || []]),
|
|
18802
|
+
...(((_i = this.options.lineChart) == null ? void 0 : _i.series) || []).map((serie) => [serie.name || "", ...serie.values || []])
|
|
18805
18803
|
];
|
|
18806
18804
|
}
|
|
18807
18805
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -17211,8 +17211,8 @@ class PictureOptions extends XmlComponent {
|
|
|
17211
17211
|
}
|
|
17212
17212
|
const SerieColors = ["accent1", "accent3", "accent4", "accent5", "accent6"];
|
|
17213
17213
|
const addSeriesSharedOptions = (root, { index, refOffset, order, name, shape }) => {
|
|
17214
|
-
root.push(new NumberValueElement("c:idx", index, ""));
|
|
17215
|
-
root.push(new NumberValueElement("c:order", order != null ? order : index, ""));
|
|
17214
|
+
root.push(new NumberValueElement("c:idx", refOffset - 2 + index, ""));
|
|
17215
|
+
root.push(new NumberValueElement("c:order", order != null ? order : refOffset - 2 + index, ""));
|
|
17216
17216
|
if (name !== void 0) {
|
|
17217
17217
|
root.push(new TextSource("c:tx", { formula: `Sheet1!$A$${refOffset + index}`, values: [name] }));
|
|
17218
17218
|
}
|
|
@@ -17379,8 +17379,8 @@ var LabelAlign = /* @__PURE__ */ ((LabelAlign2) => {
|
|
|
17379
17379
|
})(LabelAlign || {});
|
|
17380
17380
|
class CategoryAxis extends XmlComponent {
|
|
17381
17381
|
constructor(_m) {
|
|
17382
|
-
var _n = _m, { auto, label,
|
|
17383
|
-
var _a, _b, _c, _d;
|
|
17382
|
+
var _n = _m, { auto, label, extensionList } = _n, options = __objRest(_n, ["auto", "label", "extensionList"]);
|
|
17383
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17384
17384
|
super("c:catAx");
|
|
17385
17385
|
addAxisSharedOptions(this.root, options);
|
|
17386
17386
|
this.root.push(new BooleanElement("c:auto", auto != null ? auto : true, ""));
|
|
@@ -17390,13 +17390,13 @@ class CategoryAxis extends XmlComponent {
|
|
|
17390
17390
|
typeof label.offset === "string" ? new StringValueElement("c:lblOffset", label.offset, "") : new NumberValueElement("c:lblOffset", label.offset, "")
|
|
17391
17391
|
);
|
|
17392
17392
|
}
|
|
17393
|
-
if (((_b = tick == null ? void 0 :
|
|
17394
|
-
this.root.push(new NumberValueElement("c:tickLblSkip", tick.label.skip, ""));
|
|
17393
|
+
if (((_c = (_b = options.tick) == null ? void 0 : _b.label) == null ? void 0 : _c.skip) !== void 0) {
|
|
17394
|
+
this.root.push(new NumberValueElement("c:tickLblSkip", options.tick.label.skip, ""));
|
|
17395
17395
|
}
|
|
17396
|
-
if (((
|
|
17397
|
-
this.root.push(new NumberValueElement("c:tickMarkSkip", tick.mark.skip, ""));
|
|
17396
|
+
if (((_e = (_d = options.tick) == null ? void 0 : _d.mark) == null ? void 0 : _e.skip) !== void 0) {
|
|
17397
|
+
this.root.push(new NumberValueElement("c:tickMarkSkip", options.tick.mark.skip, ""));
|
|
17398
17398
|
}
|
|
17399
|
-
this.root.push(new BooleanElement("c:noMultiLvlLbl", (
|
|
17399
|
+
this.root.push(new BooleanElement("c:noMultiLvlLbl", (_f = label == null ? void 0 : label.noMultiLevel) != null ? _f : true, ""));
|
|
17400
17400
|
if (extensionList) {
|
|
17401
17401
|
this.root.push(new ExtensionList(extensionList));
|
|
17402
17402
|
}
|
|
@@ -18599,20 +18599,6 @@ class PlotArea extends XmlComponent {
|
|
|
18599
18599
|
if (area3DChart) {
|
|
18600
18600
|
this.root.push(new Area3DChart(area3DChart));
|
|
18601
18601
|
}
|
|
18602
|
-
if (lineChart) {
|
|
18603
|
-
this.root.push(
|
|
18604
|
-
new LineChart(__spreadProps(__spreadValues({
|
|
18605
|
-
categories
|
|
18606
|
-
}, lineChart), {
|
|
18607
|
-
refOffset,
|
|
18608
|
-
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18609
|
-
}))
|
|
18610
|
-
);
|
|
18611
|
-
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18612
|
-
}
|
|
18613
|
-
if (line3DChart) {
|
|
18614
|
-
this.root.push(new Line3DChart(line3DChart));
|
|
18615
|
-
}
|
|
18616
18602
|
if (stockChart) {
|
|
18617
18603
|
this.root.push(new StockChart(stockChart));
|
|
18618
18604
|
}
|
|
@@ -18657,6 +18643,20 @@ class PlotArea extends XmlComponent {
|
|
|
18657
18643
|
if (bubbleChart) {
|
|
18658
18644
|
this.root.push(new BubbleChart(bubbleChart));
|
|
18659
18645
|
}
|
|
18646
|
+
if (lineChart) {
|
|
18647
|
+
this.root.push(
|
|
18648
|
+
new LineChart(__spreadProps(__spreadValues({
|
|
18649
|
+
categories
|
|
18650
|
+
}, lineChart), {
|
|
18651
|
+
refOffset,
|
|
18652
|
+
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18653
|
+
}))
|
|
18654
|
+
);
|
|
18655
|
+
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18656
|
+
}
|
|
18657
|
+
if (line3DChart) {
|
|
18658
|
+
this.root.push(new Line3DChart(line3DChart));
|
|
18659
|
+
}
|
|
18660
18660
|
if (valueAxis || barChart) {
|
|
18661
18661
|
this.root.push(
|
|
18662
18662
|
new ValueAxis(__spreadProps(__spreadValues({
|
|
@@ -18769,7 +18769,7 @@ class ChartSpaceAttributes extends XmlAttributeComponent {
|
|
|
18769
18769
|
}
|
|
18770
18770
|
class ChartSpace extends XmlComponent {
|
|
18771
18771
|
constructor(_y) {
|
|
18772
|
-
var _z = _y, { date1904, roundedCorners,
|
|
18772
|
+
var _z = _y, { date1904, roundedCorners, spaceShape } = _z, options = __objRest(_z, ["date1904", "roundedCorners", "spaceShape"]);
|
|
18773
18773
|
super("c:chartSpace");
|
|
18774
18774
|
__publicField(this, "options");
|
|
18775
18775
|
this.options = options;
|
|
@@ -18782,9 +18782,7 @@ class ChartSpace extends XmlComponent {
|
|
|
18782
18782
|
);
|
|
18783
18783
|
this.root.push(new BooleanElement("c:date1904", date1904 != null ? date1904 : true, ""));
|
|
18784
18784
|
this.root.push(new BooleanElement("c:roundedCorners", roundedCorners != null ? roundedCorners : false, ""));
|
|
18785
|
-
|
|
18786
|
-
this.root.push(new ShapeProperties("c:spPr", shapeProperties));
|
|
18787
|
-
}
|
|
18785
|
+
this.root.push(new ShapeProperties("c:spPr", __spreadValues({ type: "noFill", outline: { type: "noFill" } }, spaceShape)));
|
|
18788
18786
|
this.root.push(new ExternalData({ id: "rId1" }));
|
|
18789
18787
|
this.root.push(new Chart$1(options));
|
|
18790
18788
|
}
|
|
@@ -18796,10 +18794,10 @@ class ChartSpace extends XmlComponent {
|
|
|
18796
18794
|
return [
|
|
18797
18795
|
[
|
|
18798
18796
|
"",
|
|
18799
|
-
...this.options.categories || ((_a = this.options.
|
|
18797
|
+
...this.options.categories || ((_a = this.options.barChart) == null ? void 0 : _a.categories) || ((_b = this.options.lineChart) == null ? void 0 : _b.categories) || ((_d = (_c = this.options.barChart) == null ? void 0 : _c.series[0]) == null ? void 0 : _d.categories) || ((_g = (_f = (_e = this.options.lineChart) == null ? void 0 : _e.series) == null ? void 0 : _f[0]) == null ? void 0 : _g.categories) || []
|
|
18800
18798
|
],
|
|
18801
|
-
...(((_h = this.options.
|
|
18802
|
-
...(((_i = this.options.
|
|
18799
|
+
...(((_h = this.options.barChart) == null ? void 0 : _h.series) || []).map((serie) => [serie.name || "", ...serie.values || []]),
|
|
18800
|
+
...(((_i = this.options.lineChart) == null ? void 0 : _i.series) || []).map((serie) => [serie.name || "", ...serie.values || []])
|
|
18803
18801
|
];
|
|
18804
18802
|
}
|
|
18805
18803
|
}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -17215,8 +17215,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17215
17215
|
}
|
|
17216
17216
|
const SerieColors = ["accent1", "accent3", "accent4", "accent5", "accent6"];
|
|
17217
17217
|
const addSeriesSharedOptions = (root, { index, refOffset, order, name, shape }) => {
|
|
17218
|
-
root.push(new NumberValueElement("c:idx", index, ""));
|
|
17219
|
-
root.push(new NumberValueElement("c:order", order != null ? order : index, ""));
|
|
17218
|
+
root.push(new NumberValueElement("c:idx", refOffset - 2 + index, ""));
|
|
17219
|
+
root.push(new NumberValueElement("c:order", order != null ? order : refOffset - 2 + index, ""));
|
|
17220
17220
|
if (name !== void 0) {
|
|
17221
17221
|
root.push(new TextSource("c:tx", { formula: `Sheet1!$A$${refOffset + index}`, values: [name] }));
|
|
17222
17222
|
}
|
|
@@ -17383,8 +17383,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17383
17383
|
})(LabelAlign || {});
|
|
17384
17384
|
class CategoryAxis extends XmlComponent {
|
|
17385
17385
|
constructor(_m) {
|
|
17386
|
-
var _n = _m, { auto, label,
|
|
17387
|
-
var _a, _b, _c, _d;
|
|
17386
|
+
var _n = _m, { auto, label, extensionList } = _n, options = __objRest(_n, ["auto", "label", "extensionList"]);
|
|
17387
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17388
17388
|
super("c:catAx");
|
|
17389
17389
|
addAxisSharedOptions(this.root, options);
|
|
17390
17390
|
this.root.push(new BooleanElement("c:auto", auto != null ? auto : true, ""));
|
|
@@ -17394,13 +17394,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17394
17394
|
typeof label.offset === "string" ? new StringValueElement("c:lblOffset", label.offset, "") : new NumberValueElement("c:lblOffset", label.offset, "")
|
|
17395
17395
|
);
|
|
17396
17396
|
}
|
|
17397
|
-
if (((_b = tick == null ? void 0 :
|
|
17398
|
-
this.root.push(new NumberValueElement("c:tickLblSkip", tick.label.skip, ""));
|
|
17397
|
+
if (((_c = (_b = options.tick) == null ? void 0 : _b.label) == null ? void 0 : _c.skip) !== void 0) {
|
|
17398
|
+
this.root.push(new NumberValueElement("c:tickLblSkip", options.tick.label.skip, ""));
|
|
17399
17399
|
}
|
|
17400
|
-
if (((
|
|
17401
|
-
this.root.push(new NumberValueElement("c:tickMarkSkip", tick.mark.skip, ""));
|
|
17400
|
+
if (((_e = (_d = options.tick) == null ? void 0 : _d.mark) == null ? void 0 : _e.skip) !== void 0) {
|
|
17401
|
+
this.root.push(new NumberValueElement("c:tickMarkSkip", options.tick.mark.skip, ""));
|
|
17402
17402
|
}
|
|
17403
|
-
this.root.push(new BooleanElement("c:noMultiLvlLbl", (
|
|
17403
|
+
this.root.push(new BooleanElement("c:noMultiLvlLbl", (_f = label == null ? void 0 : label.noMultiLevel) != null ? _f : true, ""));
|
|
17404
17404
|
if (extensionList) {
|
|
17405
17405
|
this.root.push(new ExtensionList(extensionList));
|
|
17406
17406
|
}
|
|
@@ -18603,20 +18603,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18603
18603
|
if (area3DChart) {
|
|
18604
18604
|
this.root.push(new Area3DChart(area3DChart));
|
|
18605
18605
|
}
|
|
18606
|
-
if (lineChart) {
|
|
18607
|
-
this.root.push(
|
|
18608
|
-
new LineChart(__spreadProps(__spreadValues({
|
|
18609
|
-
categories
|
|
18610
|
-
}, lineChart), {
|
|
18611
|
-
refOffset,
|
|
18612
|
-
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18613
|
-
}))
|
|
18614
|
-
);
|
|
18615
|
-
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18616
|
-
}
|
|
18617
|
-
if (line3DChart) {
|
|
18618
|
-
this.root.push(new Line3DChart(line3DChart));
|
|
18619
|
-
}
|
|
18620
18606
|
if (stockChart) {
|
|
18621
18607
|
this.root.push(new StockChart(stockChart));
|
|
18622
18608
|
}
|
|
@@ -18661,6 +18647,20 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18661
18647
|
if (bubbleChart) {
|
|
18662
18648
|
this.root.push(new BubbleChart(bubbleChart));
|
|
18663
18649
|
}
|
|
18650
|
+
if (lineChart) {
|
|
18651
|
+
this.root.push(
|
|
18652
|
+
new LineChart(__spreadProps(__spreadValues({
|
|
18653
|
+
categories
|
|
18654
|
+
}, lineChart), {
|
|
18655
|
+
refOffset,
|
|
18656
|
+
axisId: { category: categoryAxisId, value: valueAxisId }
|
|
18657
|
+
}))
|
|
18658
|
+
);
|
|
18659
|
+
refOffset += ((_a = lineChart.series) == null ? void 0 : _a.length) || 0;
|
|
18660
|
+
}
|
|
18661
|
+
if (line3DChart) {
|
|
18662
|
+
this.root.push(new Line3DChart(line3DChart));
|
|
18663
|
+
}
|
|
18664
18664
|
if (valueAxis || barChart) {
|
|
18665
18665
|
this.root.push(
|
|
18666
18666
|
new ValueAxis(__spreadProps(__spreadValues({
|
|
@@ -18773,7 +18773,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18773
18773
|
}
|
|
18774
18774
|
class ChartSpace extends XmlComponent {
|
|
18775
18775
|
constructor(_y) {
|
|
18776
|
-
var _z = _y, { date1904, roundedCorners,
|
|
18776
|
+
var _z = _y, { date1904, roundedCorners, spaceShape } = _z, options = __objRest(_z, ["date1904", "roundedCorners", "spaceShape"]);
|
|
18777
18777
|
super("c:chartSpace");
|
|
18778
18778
|
__publicField(this, "options");
|
|
18779
18779
|
this.options = options;
|
|
@@ -18786,9 +18786,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18786
18786
|
);
|
|
18787
18787
|
this.root.push(new BooleanElement("c:date1904", date1904 != null ? date1904 : true, ""));
|
|
18788
18788
|
this.root.push(new BooleanElement("c:roundedCorners", roundedCorners != null ? roundedCorners : false, ""));
|
|
18789
|
-
|
|
18790
|
-
this.root.push(new ShapeProperties("c:spPr", shapeProperties));
|
|
18791
|
-
}
|
|
18789
|
+
this.root.push(new ShapeProperties("c:spPr", __spreadValues({ type: "noFill", outline: { type: "noFill" } }, spaceShape)));
|
|
18792
18790
|
this.root.push(new ExternalData({ id: "rId1" }));
|
|
18793
18791
|
this.root.push(new Chart$1(options));
|
|
18794
18792
|
}
|
|
@@ -18800,10 +18798,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18800
18798
|
return [
|
|
18801
18799
|
[
|
|
18802
18800
|
"",
|
|
18803
|
-
...this.options.categories || ((_a = this.options.
|
|
18801
|
+
...this.options.categories || ((_a = this.options.barChart) == null ? void 0 : _a.categories) || ((_b = this.options.lineChart) == null ? void 0 : _b.categories) || ((_d = (_c = this.options.barChart) == null ? void 0 : _c.series[0]) == null ? void 0 : _d.categories) || ((_g = (_f = (_e = this.options.lineChart) == null ? void 0 : _e.series) == null ? void 0 : _f[0]) == null ? void 0 : _g.categories) || []
|
|
18804
18802
|
],
|
|
18805
|
-
...(((_h = this.options.
|
|
18806
|
-
...(((_i = this.options.
|
|
18803
|
+
...(((_h = this.options.barChart) == null ? void 0 : _h.series) || []).map((serie) => [serie.name || "", ...serie.values || []]),
|
|
18804
|
+
...(((_i = this.options.lineChart) == null ? void 0 : _i.series) || []).map((serie) => [serie.name || "", ...serie.values || []])
|
|
18807
18805
|
];
|
|
18808
18806
|
}
|
|
18809
18807
|
}
|
package/package.json
CHANGED