@visactor/vtable 1.19.10-alpha.6 → 1.19.10-alpha.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.
@@ -337,4 +337,5 @@ export class DatasetForPivotTable {
337
337
  }
338
338
  return tree.forEach((treeNode => getPath(treeNode, []))), result;
339
339
  }
340
- }
340
+ }
341
+ //# sourceMappingURL=dataset-pivot-table.js.map
@@ -86,7 +86,7 @@ export class Dataset {
86
86
  this.registerAggregator(AggregationType.CUSTOM, CustomAggregator);
87
87
  }
88
88
  processCollectedValuesWithSumBy() {
89
- var _a, _b, _c, _d, _e, _f;
89
+ var _a, _b, _c, _d, _e, _f, _g, _h;
90
90
  for (const field in this.collectedValues) if (null === (_b = null === (_a = this.collectValuesBy) || void 0 === _a ? void 0 : _a[field]) || void 0 === _b ? void 0 : _b.sumBy) for (const byKeys in this.collectedValues[field]) {
91
91
  let max;
92
92
  "sum" === (null === (_c = this.collectValuesBy[field]) || void 0 === _c ? void 0 : _c.extendRange) ? (max = Object.values(this.collectedValues[field][byKeys]).reduce(((acc, cur) => acc + cur.value()), 0),
@@ -99,6 +99,10 @@ export class Dataset {
99
99
  this.collectedValues[field][byKeys] = {}, this.collectedValues[field][byKeys].max = max,
100
100
  this.collectedValues[field][byKeys].min = min, this.needSplitPositiveAndNegative && (this.collectedValues[field][byKeys].positiveMax = positiveMax,
101
101
  this.collectedValues[field][byKeys].negativeMin = negativeMin);
102
+ } else if ("number" == typeof (null === (_g = this.collectValuesBy[field]) || void 0 === _g ? void 0 : _g.extendRange)) for (const byKeys in this.collectedValues[field]) {
103
+ let max = this.collectedValues[field][byKeys].max;
104
+ max = Math.max(max, null === (_h = this.collectValuesBy[field]) || void 0 === _h ? void 0 : _h.extendRange),
105
+ this.collectedValues[field][byKeys].max = max;
102
106
  }
103
107
  }
104
108
  processCollectedValuesWithSortBy() {