evui 3.4.152 → 3.4.154

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.
@@ -11235,7 +11235,7 @@ $({ target: 'Number', stat: true }, {
11235
11235
  /***/ "9224":
11236
11236
  /***/ (function(module) {
11237
11237
 
11238
- module.exports = JSON.parse("{\"a\":\"3.4.152\"}");
11238
+ module.exports = JSON.parse("{\"a\":\"3.4.154\"}");
11239
11239
 
11240
11240
  /***/ }),
11241
11241
 
@@ -46350,96 +46350,6 @@ var scale_time_TimeScale = /*#__PURE__*/function (_Scale) {
46350
46350
 
46351
46351
  return Math.ceil((max - min) / step);
46352
46352
  }
46353
- /**
46354
- * With range information, calculate how many labels in axis
46355
- * @param {object} range min/max information
46356
- *
46357
- * @returns {object} steps, interval, min/max graph value
46358
- */
46359
-
46360
- }, {
46361
- key: "calculateSteps",
46362
- value: function calculateSteps(range) {
46363
- var maxValue = range.maxValue,
46364
- minValue = range.minValue,
46365
- maxSteps = range.maxSteps; // 사용자 interval로 인식하는 경우: 숫자 또는 객체({ time, unit }) 형태만
46366
- // 문자열('hour', 'second' 등)은 기존 로직(분기 D)으로 처리
46367
-
46368
- var hasUserRange = Array.isArray(this.range) && this.range.length === 2;
46369
- var hasUserInterval = typeof this.interval === 'number' || _typeof(this.interval) === 'object' && this.interval !== null;
46370
- var resolvedInterval = hasUserInterval ? this.getInterval(range) : null;
46371
- var isValidInterval = resolvedInterval != null && resolvedInterval > 0 && isFinite(resolvedInterval);
46372
- var graphMin = +minValue;
46373
- var graphMax = +maxValue;
46374
- var graphRange = graphMax - graphMin;
46375
- var interval;
46376
- var steps;
46377
-
46378
- if (hasUserRange && isValidInterval) {
46379
- // 1) user range + interval
46380
- var candidateSteps = graphRange / resolvedInterval;
46381
- var isExactlyDividable = Math.abs(candidateSteps - Math.round(candidateSteps)) < 1e-10;
46382
-
46383
- if (isExactlyDividable && candidateSteps <= maxSteps) {
46384
- // 1-1) interval 호환되는 경우
46385
- interval = resolvedInterval;
46386
- steps = Math.round(candidateSteps);
46387
- } else {
46388
- // 1-2) interval 호환되지 않음 -> 사용자 interval을 사용하지 않음
46389
- steps = maxSteps;
46390
- interval = graphRange / steps;
46391
- }
46392
- } else if (hasUserRange) {
46393
- // 2) user range only
46394
- steps = maxSteps;
46395
- interval = graphRange / steps;
46396
- } else if (isValidInterval) {
46397
- // 3) user interval only
46398
- interval = resolvedInterval;
46399
- steps = Math.ceil(graphRange / interval);
46400
-
46401
- while (steps > maxSteps) {
46402
- interval *= 2;
46403
- steps = Math.ceil(graphRange / interval);
46404
- }
46405
-
46406
- graphMax = graphMin + interval * steps;
46407
- } else {
46408
- // 4) 기존 로직
46409
- interval = this.getInterval(range);
46410
- var increase = minValue;
46411
- var numberOfSteps;
46412
-
46413
- while (increase < maxValue) {
46414
- increase += interval;
46415
- }
46416
-
46417
- graphMax = increase;
46418
- numberOfSteps = Math.round(graphRange / interval);
46419
-
46420
- while (numberOfSteps > maxSteps) {
46421
- interval *= 2;
46422
- numberOfSteps = Math.round(graphRange / interval);
46423
- var tempInterval = graphRange / numberOfSteps;
46424
- interval = this.decimalPoint ? tempInterval : Math.ceil(tempInterval);
46425
- }
46426
-
46427
- if (graphMax - graphMin > numberOfSteps * interval) {
46428
- var _tempInterval = (graphMax - graphMin) / numberOfSteps;
46429
-
46430
- interval = this.decimalPoint ? _tempInterval : Math.ceil(_tempInterval);
46431
- }
46432
-
46433
- steps = numberOfSteps;
46434
- }
46435
-
46436
- return {
46437
- steps: steps,
46438
- interval: interval,
46439
- graphMin: graphMin,
46440
- graphMax: graphMax
46441
- };
46442
- }
46443
46353
  }]);
46444
46354
 
46445
46355
  return TimeScale;
@@ -50284,6 +50194,7 @@ var plugins_scrollbar_module = {
50284
50194
  Object.keys(merged).forEach(function (key) {
50285
50195
  scrollbarOpt[key] = merged[key];
50286
50196
  });
50197
+ delete scrollbarOpt.savedPosition;
50287
50198
 
50288
50199
  if (!scrollbarOpt.isInit) {
50289
50200
  var _axisOpt$2, _axisOpt$3, _axisOpt$3$range, _axisOpt$4;
@@ -50346,14 +50257,6 @@ var plugins_scrollbar_module = {
50346
50257
  }
50347
50258
  },
50348
50259
 
50349
- /**
50350
- * update scrollbar information
50351
- */
50352
- updateScrollbar: function updateScrollbar(updateData) {
50353
- this.updateScrollbarInfo('x', updateData);
50354
- this.updateScrollbarInfo('y', updateData);
50355
- },
50356
-
50357
50260
  /**
50358
50261
  * Updated scrollbar information with updated axis information
50359
50262
  * @param dir axis direction (x | y)
@@ -50741,7 +50644,6 @@ var plugins_scrollbar_module = {
50741
50644
  update: false,
50742
50645
  keepDomain: false
50743
50646
  },
50744
- updateByScrollbar: true,
50745
50647
  lightUpdate: minValue > 1
50746
50648
  });
50747
50649
  }
@@ -52680,12 +52582,13 @@ var plugins_interaction_modules = {
52680
52582
  yp = _offset[1];
52681
52583
 
52682
52584
  var isHorizontal = !!this.options.horizontal;
52683
- var mousePos = isHorizontal ? yp : xp; // 번째 표시 중인 시리즈를 기준으로 라벨 위치 확인
52585
+ var mousePos = isHorizontal ? yp : xp; // 데이터 있는 시리즈를 기준으로 라벨 위치 확인
52684
52586
 
52685
52587
  var referenceSeries = sIds.find(function (sId) {
52686
- var _this5$seriesList$sId;
52588
+ var _series$data;
52687
52589
 
52688
- return (_this5$seriesList$sId = _this5.seriesList[sId]) === null || _this5$seriesList$sId === void 0 ? void 0 : _this5$seriesList$sId.show;
52590
+ var series = _this5.seriesList[sId];
52591
+ return (series === null || series === void 0 ? void 0 : series.show) && (series === null || series === void 0 ? void 0 : (_series$data = series.data) === null || _series$data === void 0 ? void 0 : _series$data.length) > 0;
52689
52592
  });
52690
52593
 
52691
52594
  if (!referenceSeries || !((_this$seriesList$refe = this.seriesList[referenceSeries]) !== null && _this$seriesList$refe !== void 0 && _this$seriesList$refe.data)) {
@@ -52734,10 +52637,10 @@ var plugins_interaction_modules = {
52734
52637
  var _loop = function _loop(_i) {
52735
52638
  // 이 라벨에 유효한 데이터가 있는 시리즈가 하나 이상 있는지 확인
52736
52639
  var hasValidData = sIds.some(function (sId) {
52737
- var _series$data, _series$data$_i, _series$data2, _series$data2$_i;
52640
+ var _series$data2, _series$data2$_i, _series$data3, _series$data3$_i;
52738
52641
 
52739
52642
  var series = _this5.seriesList[sId];
52740
- return (series === null || series === void 0 ? void 0 : series.show) && ((_series$data = series.data) === null || _series$data === void 0 ? void 0 : (_series$data$_i = _series$data[_i]) === null || _series$data$_i === void 0 ? void 0 : _series$data$_i.o) !== null && ((_series$data2 = series.data) === null || _series$data2 === void 0 ? void 0 : (_series$data2$_i = _series$data2[_i]) === null || _series$data2$_i === void 0 ? void 0 : _series$data2$_i.o) !== undefined;
52643
+ return (series === null || series === void 0 ? void 0 : series.show) && ((_series$data2 = series.data) === null || _series$data2 === void 0 ? void 0 : (_series$data2$_i = _series$data2[_i]) === null || _series$data2$_i === void 0 ? void 0 : _series$data2$_i.o) !== null && ((_series$data3 = series.data) === null || _series$data3 === void 0 ? void 0 : (_series$data3$_i = _series$data3[_i]) === null || _series$data3$_i === void 0 ? void 0 : _series$data3$_i.o) !== undefined;
52741
52644
  });
52742
52645
 
52743
52646
  if (hasValidData) {
@@ -55701,7 +55604,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55701
55604
  _createClass(EvChart, [{
55702
55605
  key: "init",
55703
55606
  value: function init() {
55704
- var _this$createEventFunc;
55607
+ var _axesX$, _axesX$$scrollbar, _axesY$, _axesY$$scrollbar, _this$createEventFunc;
55705
55608
 
55706
55609
  var _this$data = this.data,
55707
55610
  series = _this$data.series,
@@ -55732,6 +55635,11 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55732
55635
  this.initRect();
55733
55636
  this.axesX = this.createAxes('x', axesX);
55734
55637
  this.axesY = this.createAxes('y', axesY);
55638
+
55639
+ if (axesX !== null && axesX !== void 0 && (_axesX$ = axesX[0]) !== null && _axesX$ !== void 0 && (_axesX$$scrollbar = _axesX$.scrollbar) !== null && _axesX$$scrollbar !== void 0 && _axesX$$scrollbar.use || axesY !== null && axesY !== void 0 && (_axesY$ = axesY[0]) !== null && _axesY$ !== void 0 && (_axesY$$scrollbar = _axesY$.scrollbar) !== null && _axesY$$scrollbar !== void 0 && _axesY$$scrollbar.use) {
55640
+ this.initScrollbar();
55641
+ }
55642
+
55735
55643
  this.initDefaultSelectInfo();
55736
55644
  this.drawChart();
55737
55645
 
@@ -55751,8 +55659,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55751
55659
  }, {
55752
55660
  key: "initRect",
55753
55661
  value: function initRect() {
55754
- var _opt$axesX, _opt$axesX$, _opt$axesX$$scrollbar, _opt$axesY, _opt$axesY$, _opt$axesY$$scrollbar;
55755
-
55756
55662
  var opt = this.options;
55757
55663
 
55758
55664
  if (opt.title.show) {
@@ -55771,10 +55677,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55771
55677
  this.setLegendPosition();
55772
55678
  }
55773
55679
 
55774
- if ((_opt$axesX = opt.axesX) !== null && _opt$axesX !== void 0 && (_opt$axesX$ = _opt$axesX[0]) !== null && _opt$axesX$ !== void 0 && (_opt$axesX$$scrollbar = _opt$axesX$.scrollbar) !== null && _opt$axesX$$scrollbar !== void 0 && _opt$axesX$$scrollbar.use || (_opt$axesY = opt.axesY) !== null && _opt$axesY !== void 0 && (_opt$axesY$ = _opt$axesY[0]) !== null && _opt$axesY$ !== void 0 && (_opt$axesY$$scrollbar = _opt$axesY$.scrollbar) !== null && _opt$axesY$$scrollbar !== void 0 && _opt$axesY$$scrollbar.use) {
55775
- this.initScrollbar();
55776
- }
55777
-
55778
55680
  this.chartRect = this.getChartRect();
55779
55681
  }
55780
55682
  }, {
@@ -55904,7 +55806,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55904
55806
  this.drawSeries(hitInfo);
55905
55807
 
55906
55808
  if ((_this$scrollbar = this.scrollbar) !== null && _this$scrollbar !== void 0 && (_this$scrollbar$x = _this$scrollbar.x) !== null && _this$scrollbar$x !== void 0 && _this$scrollbar$x.use || (_this$scrollbar2 = this.scrollbar) !== null && _this$scrollbar2 !== void 0 && (_this$scrollbar2$y = _this$scrollbar2.y) !== null && _this$scrollbar2$y !== void 0 && _this$scrollbar2$y.use) {
55907
- this.initScrollbar();
55908
55809
  this.updateScrollbarPosition();
55909
55810
  }
55910
55811
 
@@ -56558,6 +56459,25 @@ var chart_core_EvChart = /*#__PURE__*/function () {
56558
56459
  });
56559
56460
  return labelOffset;
56560
56461
  }
56462
+ /**
56463
+ * Update scrollbar information
56464
+ * @param {boolean} updateData is update data
56465
+ * @returns {undefined}
56466
+ */
56467
+
56468
+ }, {
56469
+ key: "updateScrollbar",
56470
+ value: function updateScrollbar(updateData) {
56471
+ var _this$scrollbar3, _this$scrollbar3$x, _this$options$axesX2, _this$options$axesX2$, _this$options$axesX2$2, _this$scrollbar4, _this$scrollbar4$y, _this$options$axesY2, _this$options$axesY2$, _this$options$axesY2$2;
56472
+
56473
+ if ((_this$scrollbar3 = this.scrollbar) !== null && _this$scrollbar3 !== void 0 && (_this$scrollbar3$x = _this$scrollbar3.x) !== null && _this$scrollbar3$x !== void 0 && _this$scrollbar3$x.isInit || (_this$options$axesX2 = this.options.axesX) !== null && _this$options$axesX2 !== void 0 && (_this$options$axesX2$ = _this$options$axesX2[0]) !== null && _this$options$axesX2$ !== void 0 && (_this$options$axesX2$2 = _this$options$axesX2$.scrollbar) !== null && _this$options$axesX2$2 !== void 0 && _this$options$axesX2$2.use) {
56474
+ this.updateScrollbarInfo('x', updateData);
56475
+ }
56476
+
56477
+ if ((_this$scrollbar4 = this.scrollbar) !== null && _this$scrollbar4 !== void 0 && (_this$scrollbar4$y = _this$scrollbar4.y) !== null && _this$scrollbar4$y !== void 0 && _this$scrollbar4$y.isInit || (_this$options$axesY2 = this.options.axesY) !== null && _this$options$axesY2 !== void 0 && (_this$options$axesY2$ = _this$options$axesY2[0]) !== null && _this$options$axesY2$ !== void 0 && (_this$options$axesY2$2 = _this$options$axesY2$.scrollbar) !== null && _this$options$axesY2$2 !== void 0 && _this$options$axesY2$2.use) {
56478
+ this.updateScrollbarInfo('y', updateData);
56479
+ }
56480
+ }
56561
56481
  /**
56562
56482
  * To re-render chart, reset properties, canvas and then render chart.
56563
56483
  * @param {object} updateInfo information for each components are needed to update
@@ -56580,19 +56500,13 @@ var chart_core_EvChart = /*#__PURE__*/function () {
56580
56500
  updateLegend = updateInfo.updateLegend,
56581
56501
  updateData = updateInfo.updateData,
56582
56502
  updateTooltip = updateInfo.updateTooltip,
56583
- updateByScrollbar = updateInfo.updateByScrollbar,
56584
56503
  lightUpdate = updateInfo.lightUpdate;
56585
56504
 
56586
56505
  if (!this.isInit) {
56587
56506
  return;
56588
56507
  }
56589
56508
 
56590
- if (updateByScrollbar) {
56591
- var _this$updateScrollbar;
56592
-
56593
- (_this$updateScrollbar = this.updateScrollbar) === null || _this$updateScrollbar === void 0 ? void 0 : _this$updateScrollbar.call(this, updateData);
56594
- }
56595
-
56509
+ this.updateScrollbar(updateData);
56596
56510
  this.resetProps();
56597
56511
  this.updateSeries = updateSeries;
56598
56512
 
@@ -56787,22 +56701,17 @@ var chart_core_EvChart = /*#__PURE__*/function () {
56787
56701
  }, {
56788
56702
  key: "resize",
56789
56703
  value: function resize(promiseRes) {
56790
- var _this$scrollbar3, _this$scrollbar4;
56791
-
56792
- // 차트 크기가 변경될 때 저장된 스크롤 픽셀 위치를 초기화하여
56793
- // 새로운 크기에 맞춰 스크롤바 크기/위치를 재계산하도록 함
56794
- if ((_this$scrollbar3 = this.scrollbar) !== null && _this$scrollbar3 !== void 0 && _this$scrollbar3.x) {
56795
- delete this.scrollbar.x.savedPosition;
56796
- }
56797
-
56798
- if ((_this$scrollbar4 = this.scrollbar) !== null && _this$scrollbar4 !== void 0 && _this$scrollbar4.y) {
56799
- delete this.scrollbar.y.savedPosition;
56800
- }
56704
+ var _this$options$axesX3, _this$options$axesX3$, _this$options$axesX3$2, _this$options$axesY3, _this$options$axesY3$, _this$options$axesY3$2;
56801
56705
 
56802
56706
  this.clear();
56803
56707
  this.bufferCtx.restore();
56804
56708
  this.bufferCtx.save();
56805
56709
  this.initRect();
56710
+
56711
+ if ((_this$options$axesX3 = this.options.axesX) !== null && _this$options$axesX3 !== void 0 && (_this$options$axesX3$ = _this$options$axesX3[0]) !== null && _this$options$axesX3$ !== void 0 && (_this$options$axesX3$2 = _this$options$axesX3$.scrollbar) !== null && _this$options$axesX3$2 !== void 0 && _this$options$axesX3$2.use || (_this$options$axesY3 = this.options.axesY) !== null && _this$options$axesY3 !== void 0 && (_this$options$axesY3$ = _this$options$axesY3[0]) !== null && _this$options$axesY3$ !== void 0 && (_this$options$axesY3$2 = _this$options$axesY3$.scrollbar) !== null && _this$options$axesY3$2 !== void 0 && _this$options$axesY3$2.use) {
56712
+ this.initScrollbar();
56713
+ }
56714
+
56806
56715
  this.initScale();
56807
56716
  this.chartRect = this.getChartRect();
56808
56717
  this.drawChart();