evui 3.4.106 → 3.4.108

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
@@ -11173,7 +11173,7 @@ module.exports = exports;
11173
11173
  /***/ "9224":
11174
11174
  /***/ (function(module) {
11175
11175
 
11176
- module.exports = JSON.parse("{\"a\":\"3.4.106\"}");
11176
+ module.exports = JSON.parse("{\"a\":\"3.4.108\"}");
11177
11177
 
11178
11178
  /***/ }),
11179
11179
 
@@ -38860,6 +38860,8 @@ var modules = {
38860
38860
  };
38861
38861
 
38862
38862
  for (var x = 0; x < keys.length; x++) {
38863
+ var _this$dataSet$key$dat, _this$dataSet$key$dat2, _this$dataSet$key$dat3;
38864
+
38863
38865
  var key = keys[x];
38864
38866
  var data = datas[key];
38865
38867
  var storeLength = data === null || data === void 0 ? void 0 : data.length;
@@ -38878,9 +38880,6 @@ var modules = {
38878
38880
  }
38879
38881
 
38880
38882
  this.dataSet[key].length = this.options.realTimeScatter.range || 300;
38881
- this.dataSet[key].toTime = Math.floor(Date.now() / 1000) * 1000;
38882
- this.dataSet[key].fromTime = this.dataSet[key].toTime - this.dataSet[key].length * 1000;
38883
- this.dataSet[key].endIndex = this.dataSet[key].length - 1;
38884
38883
 
38885
38884
  for (var i = 0; i < storeLength; i++) {
38886
38885
  var item = data[i];
@@ -38891,6 +38890,10 @@ var modules = {
38891
38890
  }
38892
38891
 
38893
38892
  lastTime = Math.floor(lastTime / 1000) * 1000;
38893
+ var dataGroupLastTime = ((_this$dataSet$key$dat = this.dataSet[key].dataGroup.at(-1)) === null || _this$dataSet$key$dat === void 0 ? void 0 : (_this$dataSet$key$dat2 = _this$dataSet$key$dat.data) === null || _this$dataSet$key$dat2 === void 0 ? void 0 : (_this$dataSet$key$dat3 = _this$dataSet$key$dat2.at(-1)) === null || _this$dataSet$key$dat3 === void 0 ? void 0 : _this$dataSet$key$dat3.x) || Date.now();
38894
+ this.dataSet[key].toTime = lastTime || (dataGroupLastTime ? Math.floor(dataGroupLastTime / 1000) * 1000 : 0);
38895
+ this.dataSet[key].fromTime = this.dataSet[key].toTime - this.dataSet[key].length * 1000;
38896
+ this.dataSet[key].endIndex = this.dataSet[key].length - 1;
38894
38897
 
38895
38898
  if ((this.dataSet[key].toTime - lastTime) / 1000 > this.dataSet[key].length && key === '') {
38896
38899
  return;
@@ -50281,17 +50284,28 @@ var plugins_interaction_modules = {
50281
50284
  }
50282
50285
 
50283
50286
  var setSelectedItemInfo = function setSelectedItemInfo() {
50284
- var hitInfo = _this.getItemByPosition(offset, false);
50287
+ var hitInfo = _this.findHitItem(offset); // 실제 클릭된 아이템의 정보 추출 (hitId가 있으면 해당 아이템, 없으면 첫 번째 아이템)
50285
50288
 
50286
- args.label = hitInfo.label;
50287
- args.value = hitInfo.value;
50288
- args.seriesId = hitInfo.sId;
50289
- args.dataIndex = hitInfo.maxIndex;
50290
- args.acc = hitInfo.acc;
50289
+
50290
+ var hitItemId = hitInfo.hitId || Object.keys(hitInfo.items)[0];
50291
+ var hitItem = hitInfo.items[hitItemId];
50292
+
50293
+ if (hitItem) {
50294
+ var _hitItem$data, _hitItem$data2, _hitItem$data3, _hitItem$data4;
50295
+
50296
+ args.label = ((_hitItem$data = hitItem.data) === null || _hitItem$data === void 0 ? void 0 : _hitItem$data.x) || ((_hitItem$data2 = hitItem.data) === null || _hitItem$data2 === void 0 ? void 0 : _hitItem$data2.y);
50297
+ args.value = (_hitItem$data3 = hitItem.data) === null || _hitItem$data3 === void 0 ? void 0 : _hitItem$data3.o;
50298
+ args.seriesId = hitItemId;
50299
+ args.dataIndex = hitItem.index;
50300
+ args.acc = (_hitItem$data4 = hitItem.data) === null || _hitItem$data4 === void 0 ? void 0 : _hitItem$data4.acc;
50301
+ }
50291
50302
  };
50292
50303
 
50293
50304
  var setSelectedLabelInfo = function setSelectedLabelInfo(targetAxis) {
50294
- var itemHitInfo = _this.getItemByPosition(offset, false);
50305
+ var hitInfo = _this.findHitItem(offset);
50306
+
50307
+ var hitItemId = hitInfo.hitId || Object.keys(hitInfo.items)[0];
50308
+ var hitItem = hitInfo.items[hitItemId];
50295
50309
 
50296
50310
  var _this$getLabelInfoByP = _this.getLabelInfoByPosition(offset, targetAxis),
50297
50311
  clickedLabelIndex = _this$getLabelInfoByP.labelIndex;
@@ -50300,28 +50314,38 @@ var plugins_interaction_modules = {
50300
50314
  dataIndexList = _this$regulateSelecte.dataIndex;
50301
50315
 
50302
50316
  _this.defaultSelectInfo = _this.getSelectedLabelInfoWithLabelData(dataIndexList, targetAxis);
50303
- args.label = itemHitInfo.label;
50304
- args.seriesId = itemHitInfo.sId;
50305
- args.value = itemHitInfo.value;
50306
- args.acc = itemHitInfo.acc;
50307
- args.dataIndex = itemHitInfo.maxIndex;
50317
+
50318
+ if (hitItem) {
50319
+ var _hitItem$data5, _hitItem$data6, _hitItem$data7, _hitItem$data8;
50320
+
50321
+ args.label = ((_hitItem$data5 = hitItem.data) === null || _hitItem$data5 === void 0 ? void 0 : _hitItem$data5.x) || ((_hitItem$data6 = hitItem.data) === null || _hitItem$data6 === void 0 ? void 0 : _hitItem$data6.y);
50322
+ args.seriesId = hitItemId;
50323
+ args.value = (_hitItem$data7 = hitItem.data) === null || _hitItem$data7 === void 0 ? void 0 : _hitItem$data7.o;
50324
+ args.acc = (_hitItem$data8 = hitItem.data) === null || _hitItem$data8 === void 0 ? void 0 : _hitItem$data8.acc;
50325
+ args.dataIndex = hitItem.index;
50326
+ }
50308
50327
  };
50309
50328
 
50310
50329
  var setSelectedSeriesInfo = function setSelectedSeriesInfo() {
50311
- var itemHitInfo = _this.getItemByPosition(offset, false);
50330
+ var hitInfo = _this.findHitItem(offset);
50312
50331
 
50313
- var hitInfo = _this.getSeriesInfoByPosition(offset);
50332
+ var hitItemId = hitInfo.hitId || Object.keys(hitInfo.items)[0];
50333
+ var hitItem = hitInfo.items[hitItemId];
50314
50334
 
50315
- if (hitInfo.sId !== null) {
50316
- var _allSelectedList$seri;
50335
+ var seriesHitInfo = _this.getSeriesInfoByPosition(offset);
50317
50336
 
50318
- var allSelectedList = _this.updateSelectedSeriesInfo(hitInfo.sId, true);
50337
+ if (seriesHitInfo.sId !== null) {
50338
+ var allSelectedList = _this.updateSelectedSeriesInfo(seriesHitInfo.sId, true);
50319
50339
 
50320
- args.label = itemHitInfo.label;
50321
- args.value = itemHitInfo.value;
50322
- args.seriesId = (_allSelectedList$seri = allSelectedList.seriesId) === null || _allSelectedList$seri === void 0 ? void 0 : _allSelectedList$seri.at(0);
50323
- args.acc = itemHitInfo.acc;
50324
- args.dataIndex = itemHitInfo.maxIndex;
50340
+ if (hitItem) {
50341
+ var _hitItem$data9, _hitItem$data10, _hitItem$data11, _allSelectedList$seri, _hitItem$data12;
50342
+
50343
+ args.label = ((_hitItem$data9 = hitItem.data) === null || _hitItem$data9 === void 0 ? void 0 : _hitItem$data9.x) || ((_hitItem$data10 = hitItem.data) === null || _hitItem$data10 === void 0 ? void 0 : _hitItem$data10.y);
50344
+ args.value = (_hitItem$data11 = hitItem.data) === null || _hitItem$data11 === void 0 ? void 0 : _hitItem$data11.o;
50345
+ args.seriesId = (_allSelectedList$seri = allSelectedList.seriesId) === null || _allSelectedList$seri === void 0 ? void 0 : _allSelectedList$seri.at(0);
50346
+ args.acc = (_hitItem$data12 = hitItem.data) === null || _hitItem$data12 === void 0 ? void 0 : _hitItem$data12.acc;
50347
+ args.dataIndex = hitItem.index;
50348
+ }
50325
50349
  }
50326
50350
  };
50327
50351