@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.
@@ -88,7 +88,7 @@ class Dataset {
88
88
  this.registerAggregator(ts_types_1.AggregationType.CUSTOM, aggregation_1.CustomAggregator);
89
89
  }
90
90
  processCollectedValuesWithSumBy() {
91
- var _a, _b, _c, _d, _e, _f;
91
+ var _a, _b, _c, _d, _e, _f, _g, _h;
92
92
  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]) {
93
93
  let max;
94
94
  "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),
@@ -101,6 +101,10 @@ class Dataset {
101
101
  this.collectedValues[field][byKeys] = {}, this.collectedValues[field][byKeys].max = max,
102
102
  this.collectedValues[field][byKeys].min = min, this.needSplitPositiveAndNegative && (this.collectedValues[field][byKeys].positiveMax = positiveMax,
103
103
  this.collectedValues[field][byKeys].negativeMin = negativeMin);
104
+ } else if ("number" == typeof (null === (_g = this.collectValuesBy[field]) || void 0 === _g ? void 0 : _g.extendRange)) for (const byKeys in this.collectedValues[field]) {
105
+ let max = this.collectedValues[field][byKeys].max;
106
+ max = Math.max(max, null === (_h = this.collectValuesBy[field]) || void 0 === _h ? void 0 : _h.extendRange),
107
+ this.collectedValues[field][byKeys].max = max;
104
108
  }
105
109
  }
106
110
  processCollectedValuesWithSortBy() {
@@ -924,4 +928,5 @@ function arraySortByAnotherArray(array, sortArray) {
924
928
  }));
925
929
  }
926
930
 
931
+ //# sourceMappingURL=dataset.js.map
927
932
  exports.Dataset = Dataset;