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.
package/dist/evui.umd.js CHANGED
@@ -11236,7 +11236,7 @@ var update = add("9519e5b6", content, true, {"sourceMap":false,"shadowMode":fals
11236
11236
  /***/ "9224":
11237
11237
  /***/ (function(module) {
11238
11238
 
11239
- module.exports = JSON.parse("{\"a\":\"3.4.148\"}");
11239
+ module.exports = JSON.parse("{\"a\":\"3.4.150\"}");
11240
11240
 
11241
11241
  /***/ }),
11242
11242
 
@@ -14967,6 +14967,22 @@ addToUnscopables('values');
14967
14967
  addToUnscopables('entries');
14968
14968
 
14969
14969
 
14970
+ /***/ }),
14971
+
14972
+ /***/ "e285":
14973
+ /***/ (function(module, exports, __webpack_require__) {
14974
+
14975
+ var global = __webpack_require__("da84");
14976
+
14977
+ var globalIsFinite = global.isFinite;
14978
+
14979
+ // `Number.isFinite` method
14980
+ // https://tc39.github.io/ecma262/#sec-number.isfinite
14981
+ module.exports = Number.isFinite || function isFinite(it) {
14982
+ return typeof it == 'number' && globalIsFinite(it);
14983
+ };
14984
+
14985
+
14970
14986
  /***/ }),
14971
14987
 
14972
14988
  /***/ "e2cc":
@@ -15773,6 +15789,19 @@ module.exports = exports;
15773
15789
  /* unused harmony reexport * */
15774
15790
 
15775
15791
 
15792
+ /***/ }),
15793
+
15794
+ /***/ "f00c":
15795
+ /***/ (function(module, exports, __webpack_require__) {
15796
+
15797
+ var $ = __webpack_require__("23e7");
15798
+ var numberIsFinite = __webpack_require__("e285");
15799
+
15800
+ // `Number.isFinite` method
15801
+ // https://tc39.github.io/ecma262/#sec-number.isfinite
15802
+ $({ target: 'Number', stat: true }, { isFinite: numberIsFinite });
15803
+
15804
+
15776
15805
  /***/ }),
15777
15806
 
15778
15807
  /***/ "f069":
@@ -38366,6 +38395,9 @@ function _createClass(Constructor, protoProps, staticProps) {
38366
38395
  if (staticProps) _defineProperties(Constructor, staticProps);
38367
38396
  return Constructor;
38368
38397
  }
38398
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.is-finite.js
38399
+ var es_number_is_finite = __webpack_require__("f00c");
38400
+
38369
38401
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.entries.js
38370
38402
  var es_object_entries = __webpack_require__("4fad");
38371
38403
 
@@ -38919,6 +38951,8 @@ var textMeasureCtx = textMeasureCanvas.getContext('2d');
38919
38951
 
38920
38952
 
38921
38953
 
38954
+
38955
+
38922
38956
 
38923
38957
 
38924
38958
 
@@ -39137,21 +39171,42 @@ var modules = {
39137
39171
  this.dataSet[key].dataGroup[index].max = Math.max(this.dataSet[key].dataGroup[index].max, _item.y);
39138
39172
  this.dataSet[key].dataGroup[index].min = Math.min(this.dataSet[key].dataGroup[index].min, _item.y);
39139
39173
  }
39140
- }
39174
+ } // 실제 차트에 그려지는 데이터(fromTime ~ toTime 범위)에서만 min/max 계산
39175
+
39141
39176
 
39142
39177
  var tempMinMax = {
39143
- maxY: 0,
39178
+ maxY: -Infinity,
39144
39179
  minY: Infinity
39145
39180
  };
39181
+ var _this$dataSet$key = this.dataSet[key],
39182
+ fromTime = _this$dataSet$key.fromTime,
39183
+ toTime = _this$dataSet$key.toTime;
39146
39184
 
39147
39185
  for (var _i4 = 0; _i4 < this.dataSet[key].length; _i4++) {
39148
- if (this.dataSet[key].dataGroup[_i4].max > tempMinMax.maxY) {
39149
- tempMinMax.maxY = this.dataSet[key].dataGroup[_i4].max;
39150
- }
39186
+ var groupData = this.dataSet[key].dataGroup[_i4].data;
39187
+
39188
+ for (var j = 0; j < groupData.length; j++) {
39189
+ var _item2 = groupData[j]; // 현재 시간 범위 내의 데이터만 minMax 계산에 포함
39151
39190
 
39152
- if (this.dataSet[key].dataGroup[_i4].min < tempMinMax.minY) {
39153
- tempMinMax.minY = this.dataSet[key].dataGroup[_i4].min;
39191
+ if (_item2.x >= fromTime && _item2.x <= toTime) {
39192
+ if (_item2.y > tempMinMax.maxY) {
39193
+ tempMinMax.maxY = _item2.y;
39194
+ }
39195
+
39196
+ if (_item2.y < tempMinMax.minY) {
39197
+ tempMinMax.minY = _item2.y;
39198
+ }
39199
+ }
39154
39200
  }
39201
+ } // 유효한 데이터가 없는 경우 기본값 설정
39202
+
39203
+
39204
+ if (!Number.isFinite(tempMinMax.maxY)) {
39205
+ tempMinMax.maxY = 0;
39206
+ }
39207
+
39208
+ if (!Number.isFinite(tempMinMax.minY)) {
39209
+ tempMinMax.minY = 0;
39155
39210
  }
39156
39211
 
39157
39212
  minMaxValues.maxY = Math.max(minMaxValues.maxY, tempMinMax.maxY);
@@ -55429,11 +55484,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55429
55484
  }, {
55430
55485
  key: "adjustXAndYAxisWidth",
55431
55486
  value: function adjustXAndYAxisWidth() {
55432
- var _this2 = this,
55433
- _this$axesRange,
55434
- _this$axesRange$x,
55435
- _this$axesRange2,
55436
- _this$axesRange2$y;
55487
+ var _this2 = this;
55437
55488
 
55438
55489
  var getNotFormattedLabels = function getNotFormattedLabels(axesSteps, axisType, axis) {
55439
55490
  var _ref2 = axesSteps !== null && axesSteps !== void 0 ? axesSteps : {},
@@ -55477,42 +55528,51 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55477
55528
  return result;
55478
55529
  };
55479
55530
 
55480
- var adjustedRange = {
55481
- 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) {
55482
- var _this2$axesSteps, _axis$labelStyle, _axis$getLabelWidthHa, _axis$getLabelWidthHa2;
55483
-
55484
- var axis = _this2.axesX[index];
55485
- var axesSteps = (_this2$axesSteps = _this2.axesSteps) === null || _this2$axesSteps === void 0 ? void 0 : _this2$axesSteps.x[index];
55486
- var notFormattedLabels = getNotFormattedLabels(axesSteps, 'x', axis);
55487
- 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;
55488
- 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;
55489
- return _objectSpread2(_objectSpread2({}, value), {}, {
55490
- size: {
55491
- width: fixWidth || Math.max(maxWidth, value.size.width),
55492
- height: value.size.height
55493
- }
55494
- });
55495
- }),
55496
- 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) {
55497
- var _this2$axesSteps2, _axis$labelStyle2, _axis$getLabelWidthHa3, _axis$getLabelWidthHa4;
55498
-
55499
- var axis = _this2.axesY[index];
55500
- var axesSteps = (_this2$axesSteps2 = _this2.axesSteps) === null || _this2$axesSteps2 === void 0 ? void 0 : _this2$axesSteps2.y[index];
55501
- var notFormattedLabels = getNotFormattedLabels(axesSteps, 'y', axis);
55502
- 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;
55503
- 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;
55504
- return _objectSpread2(_objectSpread2({}, value), {}, {
55505
- size: {
55506
- width: fixWidth || Math.max(maxWidth, value.size.width),
55507
- height: value.size.height
55508
- }
55509
- });
55510
- })
55531
+ var remeasureRange = function remeasureRange(currentRange) {
55532
+ var _currentRange$x, _currentRange$y;
55533
+
55534
+ return {
55535
+ 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) {
55536
+ var _this2$axesSteps, _axis$labelStyle, _axis$getLabelWidthHa, _axis$getLabelWidthHa2;
55537
+
55538
+ var axis = _this2.axesX[index];
55539
+ var axesSteps = (_this2$axesSteps = _this2.axesSteps) === null || _this2$axesSteps === void 0 ? void 0 : _this2$axesSteps.x[index];
55540
+ var notFormattedLabels = getNotFormattedLabels(axesSteps, 'x', axis);
55541
+ 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;
55542
+ 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;
55543
+ return _objectSpread2(_objectSpread2({}, value), {}, {
55544
+ size: {
55545
+ width: fixWidth || Math.max(maxWidth, value.size.width),
55546
+ height: value.size.height
55547
+ }
55548
+ });
55549
+ }),
55550
+ 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) {
55551
+ var _this2$axesSteps2, _axis$labelStyle2, _axis$getLabelWidthHa3, _axis$getLabelWidthHa4;
55552
+
55553
+ var axis = _this2.axesY[index];
55554
+ var axesSteps = (_this2$axesSteps2 = _this2.axesSteps) === null || _this2$axesSteps2 === void 0 ? void 0 : _this2$axesSteps2.y[index];
55555
+ var notFormattedLabels = getNotFormattedLabels(axesSteps, 'y', axis);
55556
+ 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;
55557
+ 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;
55558
+ return _objectSpread2(_objectSpread2({}, value), {}, {
55559
+ size: {
55560
+ width: fixWidth || Math.max(maxWidth, value.size.width),
55561
+ height: value.size.height
55562
+ }
55563
+ });
55564
+ })
55565
+ };
55511
55566
  };
55512
- this.axesRange = adjustedRange;
55513
- this.labelOffset = this.getLabelOffset(adjustedRange);
55567
+
55568
+ this.axesRange = remeasureRange(this.axesRange);
55569
+ this.labelOffset = this.getLabelOffset(this.axesRange);
55514
55570
  this.labelRange = this.getAxesLabelRange();
55515
- this.axesSteps = this.calculateSteps();
55571
+ this.axesSteps = this.calculateSteps(); // 새로운 step 기준으로 라벨 너비를 다시 측정하여 잘림 방지
55572
+ // TODO: 추후 개선 (3.4.200 이후 버전)
55573
+
55574
+ this.axesRange = remeasureRange(this.axesRange);
55575
+ this.labelOffset = this.getLabelOffset(this.axesRange);
55516
55576
  }
55517
55577
  /**
55518
55578
  * To draw canvas chart, it processes several sequential jobs
@@ -56372,7 +56432,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
56372
56432
  this.axesRange = null;
56373
56433
  this.labelOffset = null;
56374
56434
  this.chartRect = null;
56375
- this.pieDataSet = [];
56376
56435
  }
56377
56436
  /**
56378
56437
  * Clear overlay canvas