@visactor/vtable 1.7.7 → 1.7.8-alpha.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.
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +19 -3
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/drill.js +1 -2
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/layout-helper.js +2 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +25 -2
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +19 -3
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/drill.js +1 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/layout-helper.js +2 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/es/dataset/dataset.js
CHANGED
|
@@ -530,9 +530,25 @@ export class Dataset {
|
|
|
530
530
|
colCompute(flatRowKey, flatColKey);
|
|
531
531
|
}));
|
|
532
532
|
})), rowTotalKeys.forEach((flatRowKey => {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
533
|
+
var _a, _b;
|
|
534
|
+
if (Object.keys(that.tree[flatRowKey]).forEach((flatColKey => {
|
|
535
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
536
|
+
if (colCompute(flatRowKey, flatColKey), (null === (_b = null === (_a = that.totals) || void 0 === _a ? void 0 : _a.column) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = that.totals) || void 0 === _c ? void 0 : _c.column) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) > 0 && !1 !== that.totals.column.showSubTotals) {
|
|
537
|
+
const colKey = flatColKey.split(this.stringJoinChar);
|
|
538
|
+
for (let i = 0, len = null === (_h = null === (_g = null === (_f = that.totals) || void 0 === _f ? void 0 : _f.column) || void 0 === _g ? void 0 : _g.subTotalsDimensions) || void 0 === _h ? void 0 : _h.length; i < len; i++) {
|
|
539
|
+
const dimension = that.totals.column.subTotalsDimensions[i], dimensionIndex = that.columns.indexOf(dimension);
|
|
540
|
+
if (dimensionIndex >= 0) {
|
|
541
|
+
const colTotalKey = colKey.slice(0, dimensionIndex + 1);
|
|
542
|
+
colTotalKey.push(that.colSubTotalLabel);
|
|
543
|
+
const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
|
|
544
|
+
this.tree[flatRowKey][flatColTotalKey] || colCompute(flatRowKey, flatColTotalKey);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
})), (null === (_b = null === (_a = that.totals) || void 0 === _a ? void 0 : _a.column) || void 0 === _b ? void 0 : _b.showGrandTotals) || 0 === this.rows.length) {
|
|
549
|
+
const flatColTotalKey = that.colGrandTotalLabel;
|
|
550
|
+
this.tree[flatRowKey][flatColTotalKey] || colCompute(flatRowKey, flatColTotalKey);
|
|
551
|
+
}
|
|
536
552
|
}));
|
|
537
553
|
}
|
|
538
554
|
}
|