@bizdoc/core 1.13.0-next.1 → 1.13.0-next.2
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/esm2020/lib/cube/cube.service.mjs +1 -1
- package/esm2020/lib/cube/matrix/table.component.mjs +17 -17
- package/fesm2015/bizdoc-core.mjs +16 -16
- package/fesm2015/bizdoc-core.mjs.map +1 -1
- package/fesm2020/bizdoc-core.mjs +16 -16
- package/fesm2020/bizdoc-core.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2015/bizdoc-core.mjs
CHANGED
@@ -14798,7 +14798,7 @@ class CubeMatrixComponent {
|
|
14798
14798
|
this.refresh();
|
14799
14799
|
}
|
14800
14800
|
_addindices() {
|
14801
|
-
const collection = this.indexAt === '
|
14801
|
+
const collection = this.indexAt === 'xAxis' ? this.columns : this.rows;
|
14802
14802
|
this.indices.forEach((x, i) => {
|
14803
14803
|
const header = {
|
14804
14804
|
key: x.name,
|
@@ -14806,10 +14806,10 @@ class CubeMatrixComponent {
|
|
14806
14806
|
index: x,
|
14807
14807
|
accumulate: x.accumulate
|
14808
14808
|
};
|
14809
|
-
if (this.placeAt === '
|
14810
|
-
collection.splice(i, 0, header);
|
14811
|
-
else
|
14809
|
+
if (this.placeAt === 'trailing')
|
14812
14810
|
collection.push(header);
|
14811
|
+
else
|
14812
|
+
collection.splice(i, 0, header);
|
14813
14813
|
});
|
14814
14814
|
}
|
14815
14815
|
_addsumheaders() {
|
@@ -14875,17 +14875,17 @@ class CubeMatrixComponent {
|
|
14875
14875
|
const d = {};
|
14876
14876
|
series.forEach(s => {
|
14877
14877
|
if (s.index) {
|
14878
|
-
if (this.indexAt === '
|
14879
|
-
const row = d[s.index] = {};
|
14880
|
-
s.points.forEach(p => row[p.x] = p.y);
|
14881
|
-
}
|
14882
|
-
else
|
14878
|
+
if (this.indexAt === 'xAxis')
|
14883
14879
|
s.points.forEach(p => {
|
14884
14880
|
let row = d[p.x];
|
14885
14881
|
if (!row)
|
14886
14882
|
row = d[p.x] = {};
|
14887
14883
|
row[s.index] = p.y;
|
14888
14884
|
});
|
14885
|
+
else {
|
14886
|
+
const row = d[s.index] = {};
|
14887
|
+
s.points.forEach(p => row[p.x] = p.y);
|
14888
|
+
}
|
14889
14889
|
}
|
14890
14890
|
else {
|
14891
14891
|
const row = d[s.name] = {};
|
@@ -14908,20 +14908,20 @@ class CubeMatrixComponent {
|
|
14908
14908
|
this.rows.forEach(r => {
|
14909
14909
|
const datarow = data[r.key];
|
14910
14910
|
if (datarow) {
|
14911
|
-
let
|
14911
|
+
let columnTotal = 0;
|
14912
14912
|
this.columns.forEach(c => {
|
14913
14913
|
if (c.accumulate === false || c.sum !== undefined)
|
14914
14914
|
return;
|
14915
14915
|
let val = datarow[c.key];
|
14916
14916
|
if (val !== undefined)
|
14917
|
-
|
14917
|
+
columnTotal += this.indices.length === 0 || this.indexAt !== 'xAxis' ||
|
14918
14918
|
c.index !== undefined ? val : -val;
|
14919
14919
|
});
|
14920
|
-
datarow['_total'] = this._format(
|
14920
|
+
datarow['_total'] = this._format(columnTotal, r);
|
14921
14921
|
if (!r.sum)
|
14922
14922
|
grand += this.indices.length === 0 ||
|
14923
14923
|
this.indexAt === 'xAxis' ||
|
14924
|
-
r.index !== undefined ?
|
14924
|
+
r.index !== undefined ? columnTotal : -columnTotal;
|
14925
14925
|
}
|
14926
14926
|
else
|
14927
14927
|
data[r.key] = {
|
@@ -14931,16 +14931,16 @@ class CubeMatrixComponent {
|
|
14931
14931
|
const totals = data['_total'] = this.totals = {};
|
14932
14932
|
totals['_grand'] = this._format(grand);
|
14933
14933
|
this.columns.forEach(c => {
|
14934
|
-
let
|
14934
|
+
let rowTotal = 0;
|
14935
14935
|
this.rows.forEach(row => {
|
14936
14936
|
if (row.accumulate === false || row.sum !== undefined)
|
14937
14937
|
return;
|
14938
14938
|
const val = data[row.key][c.key];
|
14939
14939
|
if (val !== undefined)
|
14940
|
-
|
14940
|
+
rowTotal += this.indices.length === 0 || this.indexAt === 'xAxis' ||
|
14941
14941
|
row.index !== undefined ? val : -val;
|
14942
14942
|
});
|
14943
|
-
totals[c.key] = this._format(
|
14943
|
+
totals[c.key] = this._format(rowTotal, c);
|
14944
14944
|
});
|
14945
14945
|
}
|
14946
14946
|
_calculatesum(data) {
|