evui 3.4.148 → 3.4.150

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.
@@ -11227,7 +11227,7 @@ var update = add("9519e5b6", content, true, {"sourceMap":false,"shadowMode":fals
11227
11227
  /***/ "9224":
11228
11228
  /***/ (function(module) {
11229
11229
 
11230
- module.exports = JSON.parse("{\"a\":\"3.4.148\"}");
11230
+ module.exports = JSON.parse("{\"a\":\"3.4.150\"}");
11231
11231
 
11232
11232
  /***/ }),
11233
11233
 
@@ -14958,6 +14958,22 @@ addToUnscopables('values');
14958
14958
  addToUnscopables('entries');
14959
14959
 
14960
14960
 
14961
+ /***/ }),
14962
+
14963
+ /***/ "e285":
14964
+ /***/ (function(module, exports, __webpack_require__) {
14965
+
14966
+ var global = __webpack_require__("da84");
14967
+
14968
+ var globalIsFinite = global.isFinite;
14969
+
14970
+ // `Number.isFinite` method
14971
+ // https://tc39.github.io/ecma262/#sec-number.isfinite
14972
+ module.exports = Number.isFinite || function isFinite(it) {
14973
+ return typeof it == 'number' && globalIsFinite(it);
14974
+ };
14975
+
14976
+
14961
14977
  /***/ }),
14962
14978
 
14963
14979
  /***/ "e2cc":
@@ -15764,6 +15780,19 @@ module.exports = exports;
15764
15780
  /* unused harmony reexport * */
15765
15781
 
15766
15782
 
15783
+ /***/ }),
15784
+
15785
+ /***/ "f00c":
15786
+ /***/ (function(module, exports, __webpack_require__) {
15787
+
15788
+ var $ = __webpack_require__("23e7");
15789
+ var numberIsFinite = __webpack_require__("e285");
15790
+
15791
+ // `Number.isFinite` method
15792
+ // https://tc39.github.io/ecma262/#sec-number.isfinite
15793
+ $({ target: 'Number', stat: true }, { isFinite: numberIsFinite });
15794
+
15795
+
15767
15796
  /***/ }),
15768
15797
 
15769
15798
  /***/ "f069":
@@ -38357,6 +38386,9 @@ function _createClass(Constructor, protoProps, staticProps) {
38357
38386
  if (staticProps) _defineProperties(Constructor, staticProps);
38358
38387
  return Constructor;
38359
38388
  }
38389
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.is-finite.js
38390
+ var es_number_is_finite = __webpack_require__("f00c");
38391
+
38360
38392
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.entries.js
38361
38393
  var es_object_entries = __webpack_require__("4fad");
38362
38394
 
@@ -38910,6 +38942,8 @@ var textMeasureCtx = textMeasureCanvas.getContext('2d');
38910
38942
 
38911
38943
 
38912
38944
 
38945
+
38946
+
38913
38947
 
38914
38948
 
38915
38949
 
@@ -39128,21 +39162,42 @@ var modules = {
39128
39162
  this.dataSet[key].dataGroup[index].max = Math.max(this.dataSet[key].dataGroup[index].max, _item.y);
39129
39163
  this.dataSet[key].dataGroup[index].min = Math.min(this.dataSet[key].dataGroup[index].min, _item.y);
39130
39164
  }
39131
- }
39165
+ } // 실제 차트에 그려지는 데이터(fromTime ~ toTime 범위)에서만 min/max 계산
39166
+
39132
39167
 
39133
39168
  var tempMinMax = {
39134
- maxY: 0,
39169
+ maxY: -Infinity,
39135
39170
  minY: Infinity
39136
39171
  };
39172
+ var _this$dataSet$key = this.dataSet[key],
39173
+ fromTime = _this$dataSet$key.fromTime,
39174
+ toTime = _this$dataSet$key.toTime;
39137
39175
 
39138
39176
  for (var _i4 = 0; _i4 < this.dataSet[key].length; _i4++) {
39139
- if (this.dataSet[key].dataGroup[_i4].max > tempMinMax.maxY) {
39140
- tempMinMax.maxY = this.dataSet[key].dataGroup[_i4].max;
39141
- }
39177
+ var groupData = this.dataSet[key].dataGroup[_i4].data;
39178
+
39179
+ for (var j = 0; j < groupData.length; j++) {
39180
+ var _item2 = groupData[j]; // 현재 시간 범위 내의 데이터만 minMax 계산에 포함
39142
39181
 
39143
- if (this.dataSet[key].dataGroup[_i4].min < tempMinMax.minY) {
39144
- tempMinMax.minY = this.dataSet[key].dataGroup[_i4].min;
39182
+ if (_item2.x >= fromTime && _item2.x <= toTime) {
39183
+ if (_item2.y > tempMinMax.maxY) {
39184
+ tempMinMax.maxY = _item2.y;
39185
+ }
39186
+
39187
+ if (_item2.y < tempMinMax.minY) {
39188
+ tempMinMax.minY = _item2.y;
39189
+ }
39190
+ }
39145
39191
  }
39192
+ } // 유효한 데이터가 없는 경우 기본값 설정
39193
+
39194
+
39195
+ if (!Number.isFinite(tempMinMax.maxY)) {
39196
+ tempMinMax.maxY = 0;
39197
+ }
39198
+
39199
+ if (!Number.isFinite(tempMinMax.minY)) {
39200
+ tempMinMax.minY = 0;
39146
39201
  }
39147
39202
 
39148
39203
  minMaxValues.maxY = Math.max(minMaxValues.maxY, tempMinMax.maxY);
@@ -55420,11 +55475,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55420
55475
  }, {
55421
55476
  key: "adjustXAndYAxisWidth",
55422
55477
  value: function adjustXAndYAxisWidth() {
55423
- var _this2 = this,
55424
- _this$axesRange,
55425
- _this$axesRange$x,
55426
- _this$axesRange2,
55427
- _this$axesRange2$y;
55478
+ var _this2 = this;
55428
55479
 
55429
55480
  var getNotFormattedLabels = function getNotFormattedLabels(axesSteps, axisType, axis) {
55430
55481
  var _ref2 = axesSteps !== null && axesSteps !== void 0 ? axesSteps : {},
@@ -55468,42 +55519,51 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55468
55519
  return result;
55469
55520
  };
55470
55521
 
55471
- var adjustedRange = {
55472
- x: (_this$axesRange = this.axesRange) === null || _this$axesRange === void 0 ? void 0 : (_this$axesRange$x = _this$axesRange.x) === null || _this$axesRange$x === void 0 ? void 0 : _this$axesRange$x.map(function (value, index) {
55473
- var _this2$axesSteps, _axis$labelStyle, _axis$getLabelWidthHa, _axis$getLabelWidthHa2;
55474
-
55475
- var axis = _this2.axesX[index];
55476
- var axesSteps = (_this2$axesSteps = _this2.axesSteps) === null || _this2$axesSteps === void 0 ? void 0 : _this2$axesSteps.x[index];
55477
- var notFormattedLabels = getNotFormattedLabels(axesSteps, 'x', axis);
55478
- var fixWidth = truthyNumber(axis === null || axis === void 0 ? void 0 : (_axis$labelStyle = axis.labelStyle) === null || _axis$labelStyle === void 0 ? void 0 : _axis$labelStyle.fixWidth) ? axis.labelStyle.fixWidth : 0;
55479
- var maxWidth = (_axis$getLabelWidthHa = axis === null || axis === void 0 ? void 0 : (_axis$getLabelWidthHa2 = axis.getLabelWidthHasMaxLength) === null || _axis$getLabelWidthHa2 === void 0 ? void 0 : _axis$getLabelWidthHa2.call(axis, notFormattedLabels, _this2.chartRect)) !== null && _axis$getLabelWidthHa !== void 0 ? _axis$getLabelWidthHa : 0;
55480
- return _objectSpread2(_objectSpread2({}, value), {}, {
55481
- size: {
55482
- width: fixWidth || Math.max(maxWidth, value.size.width),
55483
- height: value.size.height
55484
- }
55485
- });
55486
- }),
55487
- y: (_this$axesRange2 = this.axesRange) === null || _this$axesRange2 === void 0 ? void 0 : (_this$axesRange2$y = _this$axesRange2.y) === null || _this$axesRange2$y === void 0 ? void 0 : _this$axesRange2$y.map(function (value, index) {
55488
- var _this2$axesSteps2, _axis$labelStyle2, _axis$getLabelWidthHa3, _axis$getLabelWidthHa4;
55489
-
55490
- var axis = _this2.axesY[index];
55491
- var axesSteps = (_this2$axesSteps2 = _this2.axesSteps) === null || _this2$axesSteps2 === void 0 ? void 0 : _this2$axesSteps2.y[index];
55492
- var notFormattedLabels = getNotFormattedLabels(axesSteps, 'y', axis);
55493
- var fixWidth = truthyNumber(axis === null || axis === void 0 ? void 0 : (_axis$labelStyle2 = axis.labelStyle) === null || _axis$labelStyle2 === void 0 ? void 0 : _axis$labelStyle2.fixWidth) ? axis.labelStyle.fixWidth : 0;
55494
- var maxWidth = (_axis$getLabelWidthHa3 = axis === null || axis === void 0 ? void 0 : (_axis$getLabelWidthHa4 = axis.getLabelWidthHasMaxLength) === null || _axis$getLabelWidthHa4 === void 0 ? void 0 : _axis$getLabelWidthHa4.call(axis, notFormattedLabels, _this2.chartRect)) !== null && _axis$getLabelWidthHa3 !== void 0 ? _axis$getLabelWidthHa3 : 0;
55495
- return _objectSpread2(_objectSpread2({}, value), {}, {
55496
- size: {
55497
- width: fixWidth || Math.max(maxWidth, value.size.width),
55498
- height: value.size.height
55499
- }
55500
- });
55501
- })
55522
+ var remeasureRange = function remeasureRange(currentRange) {
55523
+ var _currentRange$x, _currentRange$y;
55524
+
55525
+ return {
55526
+ x: currentRange === null || currentRange === void 0 ? void 0 : (_currentRange$x = currentRange.x) === null || _currentRange$x === void 0 ? void 0 : _currentRange$x.map(function (value, index) {
55527
+ var _this2$axesSteps, _axis$labelStyle, _axis$getLabelWidthHa, _axis$getLabelWidthHa2;
55528
+
55529
+ var axis = _this2.axesX[index];
55530
+ var axesSteps = (_this2$axesSteps = _this2.axesSteps) === null || _this2$axesSteps === void 0 ? void 0 : _this2$axesSteps.x[index];
55531
+ var notFormattedLabels = getNotFormattedLabels(axesSteps, 'x', axis);
55532
+ var fixWidth = truthyNumber(axis === null || axis === void 0 ? void 0 : (_axis$labelStyle = axis.labelStyle) === null || _axis$labelStyle === void 0 ? void 0 : _axis$labelStyle.fixWidth) ? axis.labelStyle.fixWidth : 0;
55533
+ var maxWidth = (_axis$getLabelWidthHa = axis === null || axis === void 0 ? void 0 : (_axis$getLabelWidthHa2 = axis.getLabelWidthHasMaxLength) === null || _axis$getLabelWidthHa2 === void 0 ? void 0 : _axis$getLabelWidthHa2.call(axis, notFormattedLabels, _this2.chartRect)) !== null && _axis$getLabelWidthHa !== void 0 ? _axis$getLabelWidthHa : 0;
55534
+ return _objectSpread2(_objectSpread2({}, value), {}, {
55535
+ size: {
55536
+ width: fixWidth || Math.max(maxWidth, value.size.width),
55537
+ height: value.size.height
55538
+ }
55539
+ });
55540
+ }),
55541
+ y: currentRange === null || currentRange === void 0 ? void 0 : (_currentRange$y = currentRange.y) === null || _currentRange$y === void 0 ? void 0 : _currentRange$y.map(function (value, index) {
55542
+ var _this2$axesSteps2, _axis$labelStyle2, _axis$getLabelWidthHa3, _axis$getLabelWidthHa4;
55543
+
55544
+ var axis = _this2.axesY[index];
55545
+ var axesSteps = (_this2$axesSteps2 = _this2.axesSteps) === null || _this2$axesSteps2 === void 0 ? void 0 : _this2$axesSteps2.y[index];
55546
+ var notFormattedLabels = getNotFormattedLabels(axesSteps, 'y', axis);
55547
+ var fixWidth = truthyNumber(axis === null || axis === void 0 ? void 0 : (_axis$labelStyle2 = axis.labelStyle) === null || _axis$labelStyle2 === void 0 ? void 0 : _axis$labelStyle2.fixWidth) ? axis.labelStyle.fixWidth : 0;
55548
+ var maxWidth = (_axis$getLabelWidthHa3 = axis === null || axis === void 0 ? void 0 : (_axis$getLabelWidthHa4 = axis.getLabelWidthHasMaxLength) === null || _axis$getLabelWidthHa4 === void 0 ? void 0 : _axis$getLabelWidthHa4.call(axis, notFormattedLabels, _this2.chartRect)) !== null && _axis$getLabelWidthHa3 !== void 0 ? _axis$getLabelWidthHa3 : 0;
55549
+ return _objectSpread2(_objectSpread2({}, value), {}, {
55550
+ size: {
55551
+ width: fixWidth || Math.max(maxWidth, value.size.width),
55552
+ height: value.size.height
55553
+ }
55554
+ });
55555
+ })
55556
+ };
55502
55557
  };
55503
- this.axesRange = adjustedRange;
55504
- this.labelOffset = this.getLabelOffset(adjustedRange);
55558
+
55559
+ this.axesRange = remeasureRange(this.axesRange);
55560
+ this.labelOffset = this.getLabelOffset(this.axesRange);
55505
55561
  this.labelRange = this.getAxesLabelRange();
55506
- this.axesSteps = this.calculateSteps();
55562
+ this.axesSteps = this.calculateSteps(); // 새로운 step 기준으로 라벨 너비를 다시 측정하여 잘림 방지
55563
+ // TODO: 추후 개선 (3.4.200 이후 버전)
55564
+
55565
+ this.axesRange = remeasureRange(this.axesRange);
55566
+ this.labelOffset = this.getLabelOffset(this.axesRange);
55507
55567
  }
55508
55568
  /**
55509
55569
  * To draw canvas chart, it processes several sequential jobs
@@ -56363,7 +56423,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
56363
56423
  this.axesRange = null;
56364
56424
  this.labelOffset = null;
56365
56425
  this.chartRect = null;
56366
- this.pieDataSet = [];
56367
56426
  }
56368
56427
  /**
56369
56428
  * Clear overlay canvas