@visactor/vtable 1.23.3-alpha.0 → 1.23.3

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.
@@ -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() {
@@ -916,4 +920,5 @@ function arraySortByAnotherArray(array, sortArray) {
916
920
  const aIndex = sortArray.indexOf(a), bIndex = sortArray.indexOf(b);
917
921
  return aIndex < bIndex ? -1 : aIndex > bIndex ? 1 : 0;
918
922
  }));
919
- }
923
+ }
924
+ //# sourceMappingURL=dataset.js.map