@sunertech/docx 10.0.5 → 10.0.7
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 +29 -29
- package/dist/index.iife.js +29 -29
- package/dist/index.mjs +29 -29
- package/dist/index.umd.cjs +29 -29
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10254,7 +10254,7 @@ class Marker extends XmlComponent {
|
|
|
10254
10254
|
constructor({ symbol, size, shape, extensionList }) {
|
|
10255
10255
|
super("c:marker");
|
|
10256
10256
|
if (symbol) {
|
|
10257
|
-
this.root.push(new StringEnumValueElement("c:symbol", symbol));
|
|
10257
|
+
this.root.push(new StringEnumValueElement("c:symbol", symbol, ""));
|
|
10258
10258
|
}
|
|
10259
10259
|
if (size !== void 0) {
|
|
10260
10260
|
this.root.push(new NumberValueElement("c:size", size, ""));
|
|
@@ -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
|
}
|
|
@@ -17436,8 +17436,8 @@ class LineSeries extends XmlComponent {
|
|
|
17436
17436
|
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17437
17437
|
outline: {
|
|
17438
17438
|
type: "solidFill",
|
|
17439
|
-
solidFillType: "
|
|
17440
|
-
value:
|
|
17439
|
+
solidFillType: "scheme",
|
|
17440
|
+
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17441
17441
|
width: 47625,
|
|
17442
17442
|
cap: LineCap.FLAT,
|
|
17443
17443
|
dash: { type: "preset", value: PresetLineDash.SOLID }
|
|
@@ -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({
|
|
@@ -18796,10 +18796,10 @@ class ChartSpace extends XmlComponent {
|
|
|
18796
18796
|
return [
|
|
18797
18797
|
[
|
|
18798
18798
|
"",
|
|
18799
|
-
...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) || []
|
|
18800
18800
|
],
|
|
18801
|
-
...(((_h = this.options.
|
|
18802
|
-
...(((_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 || []])
|
|
18803
18803
|
];
|
|
18804
18804
|
}
|
|
18805
18805
|
}
|
package/dist/index.iife.js
CHANGED
|
@@ -10254,7 +10254,7 @@ var docx = (function(exports) {
|
|
|
10254
10254
|
constructor({ symbol, size, shape, extensionList }) {
|
|
10255
10255
|
super("c:marker");
|
|
10256
10256
|
if (symbol) {
|
|
10257
|
-
this.root.push(new StringEnumValueElement("c:symbol", symbol));
|
|
10257
|
+
this.root.push(new StringEnumValueElement("c:symbol", symbol, ""));
|
|
10258
10258
|
}
|
|
10259
10259
|
if (size !== void 0) {
|
|
10260
10260
|
this.root.push(new NumberValueElement("c:size", size, ""));
|
|
@@ -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
|
}
|
|
@@ -17436,8 +17436,8 @@ var docx = (function(exports) {
|
|
|
17436
17436
|
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17437
17437
|
outline: {
|
|
17438
17438
|
type: "solidFill",
|
|
17439
|
-
solidFillType: "
|
|
17440
|
-
value:
|
|
17439
|
+
solidFillType: "scheme",
|
|
17440
|
+
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17441
17441
|
width: 47625,
|
|
17442
17442
|
cap: LineCap.FLAT,
|
|
17443
17443
|
dash: { type: "preset", value: PresetLineDash.SOLID }
|
|
@@ -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({
|
|
@@ -18796,10 +18796,10 @@ var docx = (function(exports) {
|
|
|
18796
18796
|
return [
|
|
18797
18797
|
[
|
|
18798
18798
|
"",
|
|
18799
|
-
...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) || []
|
|
18800
18800
|
],
|
|
18801
|
-
...(((_h = this.options.
|
|
18802
|
-
...(((_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 || []])
|
|
18803
18803
|
];
|
|
18804
18804
|
}
|
|
18805
18805
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -10252,7 +10252,7 @@ class Marker extends XmlComponent {
|
|
|
10252
10252
|
constructor({ symbol, size, shape, extensionList }) {
|
|
10253
10253
|
super("c:marker");
|
|
10254
10254
|
if (symbol) {
|
|
10255
|
-
this.root.push(new StringEnumValueElement("c:symbol", symbol));
|
|
10255
|
+
this.root.push(new StringEnumValueElement("c:symbol", symbol, ""));
|
|
10256
10256
|
}
|
|
10257
10257
|
if (size !== void 0) {
|
|
10258
10258
|
this.root.push(new NumberValueElement("c:size", size, ""));
|
|
@@ -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
|
}
|
|
@@ -17434,8 +17434,8 @@ class LineSeries extends XmlComponent {
|
|
|
17434
17434
|
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17435
17435
|
outline: {
|
|
17436
17436
|
type: "solidFill",
|
|
17437
|
-
solidFillType: "
|
|
17438
|
-
value:
|
|
17437
|
+
solidFillType: "scheme",
|
|
17438
|
+
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17439
17439
|
width: 47625,
|
|
17440
17440
|
cap: LineCap.FLAT,
|
|
17441
17441
|
dash: { type: "preset", value: PresetLineDash.SOLID }
|
|
@@ -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({
|
|
@@ -18794,10 +18794,10 @@ class ChartSpace extends XmlComponent {
|
|
|
18794
18794
|
return [
|
|
18795
18795
|
[
|
|
18796
18796
|
"",
|
|
18797
|
-
...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) || []
|
|
18798
18798
|
],
|
|
18799
|
-
...(((_h = this.options.
|
|
18800
|
-
...(((_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 || []])
|
|
18801
18801
|
];
|
|
18802
18802
|
}
|
|
18803
18803
|
}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -10256,7 +10256,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10256
10256
|
constructor({ symbol, size, shape, extensionList }) {
|
|
10257
10257
|
super("c:marker");
|
|
10258
10258
|
if (symbol) {
|
|
10259
|
-
this.root.push(new StringEnumValueElement("c:symbol", symbol));
|
|
10259
|
+
this.root.push(new StringEnumValueElement("c:symbol", symbol, ""));
|
|
10260
10260
|
}
|
|
10261
10261
|
if (size !== void 0) {
|
|
10262
10262
|
this.root.push(new NumberValueElement("c:size", size, ""));
|
|
@@ -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
|
}
|
|
@@ -17438,8 +17438,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17438
17438
|
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17439
17439
|
outline: {
|
|
17440
17440
|
type: "solidFill",
|
|
17441
|
-
solidFillType: "
|
|
17442
|
-
value:
|
|
17441
|
+
solidFillType: "scheme",
|
|
17442
|
+
value: LineSerieColors[options.index % LineSerieColors.length],
|
|
17443
17443
|
width: 47625,
|
|
17444
17444
|
cap: LineCap.FLAT,
|
|
17445
17445
|
dash: { type: "preset", value: PresetLineDash.SOLID }
|
|
@@ -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({
|
|
@@ -18798,10 +18798,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18798
18798
|
return [
|
|
18799
18799
|
[
|
|
18800
18800
|
"",
|
|
18801
|
-
...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) || []
|
|
18802
18802
|
],
|
|
18803
|
-
...(((_h = this.options.
|
|
18804
|
-
...(((_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 || []])
|
|
18805
18805
|
];
|
|
18806
18806
|
}
|
|
18807
18807
|
}
|
package/package.json
CHANGED