evui 3.4.117 → 3.4.118

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.
@@ -11171,7 +11171,7 @@ module.exports = exports;
11171
11171
  /***/ "9224":
11172
11172
  /***/ (function(module) {
11173
11173
 
11174
- module.exports = JSON.parse("{\"a\":\"3.4.117\"}");
11174
+ module.exports = JSON.parse("{\"a\":\"3.4.118\"}");
11175
11175
 
11176
11176
  /***/ }),
11177
11177
 
@@ -42435,16 +42435,29 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
42435
42435
  value: function defaultScatterDraw(param) {
42436
42436
  var _this2 = this;
42437
42437
 
42438
- var ctx = param.ctx;
42438
+ var ctx = param.ctx,
42439
+ axesSteps = param.axesSteps,
42440
+ duple = param.duple,
42441
+ legendHitInfo = param.legendHitInfo;
42442
+ var minmaxY = axesSteps.y[this.yAxisIndex];
42439
42443
  this.data.forEach(function (item, idx) {
42440
- _this2.calcItem(item, param);
42444
+ var shouldDraw = legendHitInfo ? legendHitInfo.sId === _this2.sId : !duple.has("".concat(item.x).concat(item.y));
42445
+
42446
+ if (shouldDraw) {
42447
+ if (!duple.has("".concat(item.x).concat(item.y))) {
42448
+ duple.add("".concat(item.x).concat(item.y));
42449
+ }
42441
42450
 
42442
- if (item.xp !== null && item.yp !== null) {
42443
- var color = item.dataColor || _this2.color;
42444
- ctx.strokeStyle = helpers_util.colorStringToRgba(color, _this2.getOpacity(param, color, idx));
42445
- var pointFillColor = item.dataColor || _this2.pointFill;
42446
- ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor, _this2.getOpacity(param, pointFillColor, idx));
42447
- helpers_canvas.drawPoint(ctx, _this2.pointStyle, _this2.pointSize, item.xp, item.yp);
42451
+ _this2.calcItem(item, param);
42452
+
42453
+ if (item.xp !== null && item.yp !== null) {
42454
+ var overflowColor = item.y > minmaxY.graphMax && _this2.overflowColor;
42455
+ var color = overflowColor || item.dataColor || _this2.color;
42456
+ ctx.strokeStyle = helpers_util.colorStringToRgba(color, _this2.getOpacity(param, color, idx));
42457
+ var pointFillColor = item.dataColor || _this2.pointFill;
42458
+ ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor, _this2.getOpacity(param, pointFillColor, idx));
42459
+ helpers_canvas.drawPoint(ctx, _this2.pointStyle, _this2.pointSize, item.xp, item.yp);
42460
+ }
42448
42461
  }
42449
42462
  });
42450
42463
  }
@@ -42460,7 +42473,8 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
42460
42473
  value: function realTimeScatterDraw(param) {
42461
42474
  var ctx = param.ctx,
42462
42475
  axesSteps = param.axesSteps,
42463
- duple = param.duple;
42476
+ duple = param.duple,
42477
+ legendHitInfo = param.legendHitInfo;
42464
42478
  var minmaxY = axesSteps.y[this.yAxisIndex];
42465
42479
  var pointStyle = typeof this.pointStyle === 'string' ? this.pointStyle : this.pointStyle.value;
42466
42480
  var pointSize = typeof this.pointSize === 'number' ? this.pointSize : this.pointSize.value;
@@ -42472,17 +42486,23 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
42472
42486
  var _this$data$this$sId2, _this$data$this$sId2$, _this$data$this$sId3, _this$data$this$sId3$;
42473
42487
 
42474
42488
  var item = (_this$data$this$sId3 = this.data[this.sId]) === null || _this$data$this$sId3 === void 0 ? void 0 : (_this$data$this$sId3$ = _this$data$this$sId3.dataGroup[i]) === null || _this$data$this$sId3$ === void 0 ? void 0 : _this$data$this$sId3$.data[j];
42489
+ var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : !duple.has("".concat(item.x).concat(item.y));
42490
+
42491
+ if (shouldDraw) {
42492
+ if (!duple.has("".concat(item.x).concat(item.y))) {
42493
+ duple.add("".concat(item.x).concat(item.y));
42494
+ }
42475
42495
 
42476
- if (!duple.has("".concat(item.x).concat(item.y))) {
42477
- duple.add("".concat(item.x).concat(item.y));
42478
42496
  this.calcItem(item, param);
42479
42497
 
42480
42498
  if (item.xp !== null && item.yp !== null) {
42481
42499
  var overflowColor = item.y > minmaxY.graphMax && this.overflowColor;
42482
- var color = overflowColor || item.color || this.color;
42483
- ctx.strokeStyle = color;
42484
- var pointFillColor = overflowColor || item.color || this.pointFill || this.color;
42485
- ctx.fillStyle = pointFillColor;
42500
+ var baseStrokeColor = overflowColor || item.color || this.color;
42501
+ var baseFillColor = overflowColor || item.color || this.pointFill || this.color;
42502
+ var strokeOpacity = this.getOpacity(param, baseStrokeColor, j);
42503
+ var fillOpacity = this.getOpacity(param, baseFillColor, j);
42504
+ ctx.strokeStyle = helpers_util.colorStringToRgba(baseStrokeColor, strokeOpacity);
42505
+ ctx.fillStyle = helpers_util.colorStringToRgba(baseFillColor, fillOpacity);
42486
42506
  helpers_canvas.drawPoint(ctx, pointStyle, pointSize, item.xp, item.yp);
42487
42507
  }
42488
42508
  }
@@ -47166,7 +47186,9 @@ var plugins_legend_modules = {
47166
47186
  * @returns {undefined}
47167
47187
  */
47168
47188
  updateStartEndRowIndex: function updateStartEndRowIndex() {
47169
- var index = Math.max(Math.floor(this.legendBoxDOM.scrollTop / this.legendItemHeight), 0);
47189
+ var _this$legendBoxDOM;
47190
+
47191
+ var index = Math.max(Math.floor(((_this$legendBoxDOM = this.legendBoxDOM) === null || _this$legendBoxDOM === void 0 ? void 0 : _this$legendBoxDOM.scrollTop) / this.legendItemHeight), 0);
47170
47192
  this.startRowIndex = Math.min(index, Math.max(this.totalRowCount - this.visibleRowCount, 0));
47171
47193
  this.endRowIndex = this.startRowIndex + this.visibleRowCount + 1;
47172
47194
  },
@@ -47509,26 +47531,14 @@ var plugins_legend_modules = {
47509
47531
  });
47510
47532
  };
47511
47533
  /**
47512
- * callback for legendBoxDOM hovering
47534
+ * callback for mouseleave event on legendBoxDOM
47513
47535
  *
47514
47536
  * @returns {undefined}
47515
47537
  */
47516
47538
 
47517
47539
 
47518
- this.onLegendBoxOver = function (e) {
47519
- var _targetDOM$series;
47520
-
47521
- var targetDOM = _this8.getContainerDOM(e);
47522
-
47523
- if (!targetDOM) {
47524
- return;
47525
- }
47526
-
47527
- var targetId = targetDOM === null || targetDOM === void 0 ? void 0 : (_targetDOM$series = targetDOM.series) === null || _targetDOM$series === void 0 ? void 0 : _targetDOM$series.sId;
47528
- var legendHitInfo = {
47529
- sId: targetId,
47530
- type: _this8.options.type
47531
- };
47540
+ this.onLegendBoxLeave = function () {
47541
+ _this8.legendHover = null;
47532
47542
 
47533
47543
  _this8.update({
47534
47544
  updateSeries: false,
@@ -47537,18 +47547,35 @@ var plugins_legend_modules = {
47537
47547
  keepDomain: false
47538
47548
  },
47539
47549
  hitInfo: {
47540
- legend: legendHitInfo
47550
+ legend: null
47541
47551
  }
47542
47552
  });
47543
47553
  };
47544
47554
  /**
47545
- * callback for mouseleave event on legendBoxDOM
47555
+ * callback for legendBoxDOM hovering
47546
47556
  *
47547
47557
  * @returns {undefined}
47548
47558
  */
47549
47559
 
47550
47560
 
47551
- this.onLegendBoxLeave = function () {
47561
+ this.onLegendBoxOver = function (e) {
47562
+ var _targetDOM$series;
47563
+
47564
+ var targetDOM = _this8.getContainerDOM(e);
47565
+
47566
+ if (!targetDOM) {
47567
+ _this8.onLegendBoxLeave();
47568
+
47569
+ return;
47570
+ }
47571
+
47572
+ var targetId = targetDOM === null || targetDOM === void 0 ? void 0 : (_targetDOM$series = targetDOM.series) === null || _targetDOM$series === void 0 ? void 0 : _targetDOM$series.sId;
47573
+ var legendHitInfo = {
47574
+ sId: targetId,
47575
+ type: _this8.options.type
47576
+ };
47577
+ _this8.legendHover = legendHitInfo;
47578
+
47552
47579
  _this8.update({
47553
47580
  updateSeries: false,
47554
47581
  updateSelTip: {
@@ -47556,7 +47583,7 @@ var plugins_legend_modules = {
47556
47583
  keepDomain: false
47557
47584
  },
47558
47585
  hitInfo: {
47559
- legend: null
47586
+ legend: legendHitInfo
47560
47587
  }
47561
47588
  });
47562
47589
  };
@@ -47653,6 +47680,28 @@ var plugins_legend_modules = {
47653
47680
  }
47654
47681
  });
47655
47682
  };
47683
+ /**
47684
+ * callback for mouseleave event on legendBoxDOM
47685
+ *
47686
+ * @returns {undefined}
47687
+ */
47688
+
47689
+
47690
+ this.onLegendBoxLeave = function () {
47691
+ _this9.legendHover = null;
47692
+ var series = Object.values(_this9.seriesList)[0];
47693
+ series.colorState.forEach(function (item) {
47694
+ item.state = 'normal';
47695
+ });
47696
+
47697
+ _this9.update({
47698
+ updateSeries: false,
47699
+ updateSelTip: {
47700
+ update: false,
47701
+ keepDomain: false
47702
+ }
47703
+ });
47704
+ };
47656
47705
  /**
47657
47706
  * callback for legendBoxDOM hovering
47658
47707
  *
@@ -47668,6 +47717,8 @@ var plugins_legend_modules = {
47668
47717
  var targetDOM = _this9.getContainerDOM(e);
47669
47718
 
47670
47719
  if (!targetDOM) {
47720
+ _this9.onLegendBoxLeave();
47721
+
47671
47722
  return;
47672
47723
  }
47673
47724
 
@@ -47676,6 +47727,7 @@ var plugins_legend_modules = {
47676
47727
  sId: targetId,
47677
47728
  type: _this9.options.type
47678
47729
  };
47730
+ _this9.legendHover = legendHitInfo;
47679
47731
  series.colorState.forEach(function (colorItem) {
47680
47732
  colorItem.state = colorItem.id === targetId ? 'highlight' : 'downplay';
47681
47733
  });
@@ -47691,27 +47743,6 @@ var plugins_legend_modules = {
47691
47743
  }
47692
47744
  });
47693
47745
  };
47694
- /**
47695
- * callback for mouseleave event on legendBoxDOM
47696
- *
47697
- * @returns {undefined}
47698
- */
47699
-
47700
-
47701
- this.onLegendBoxLeave = function () {
47702
- var series = Object.values(_this9.seriesList)[0];
47703
- series.colorState.forEach(function (item) {
47704
- item.state = 'normal';
47705
- });
47706
-
47707
- _this9.update({
47708
- updateSeries: false,
47709
- updateSelTip: {
47710
- update: false,
47711
- keepDomain: false
47712
- }
47713
- });
47714
- };
47715
47746
 
47716
47747
  this.legendBoxDOM.addEventListener('click', this.onLegendBoxClick);
47717
47748
  this.legendBoxDOM.addEventListener('mouseover', this.onLegendBoxOver);
@@ -47793,12 +47824,12 @@ var plugins_legend_modules = {
47793
47824
  var _this$options2,
47794
47825
  _this$options2$legend,
47795
47826
  _this$options2$legend2,
47796
- _this$legendBoxDOM,
47827
+ _this$legendBoxDOM2,
47797
47828
  _this11 = this;
47798
47829
 
47799
47830
  var columns = (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : (_this$options2$legend = _this$options2.legend) === null || _this$options2$legend === void 0 ? void 0 : (_this$options2$legend2 = _this$options2$legend.table) === null || _this$options2$legend2 === void 0 ? void 0 : _this$options2$legend2.columns;
47800
47831
  var aggregations = this.getAggregations();
47801
- var rowDOMList = (_this$legendBoxDOM = this.legendBoxDOM) === null || _this$legendBoxDOM === void 0 ? void 0 : _this$legendBoxDOM.getElementsByClassName('ev-chart-legend--table__row');
47832
+ var rowDOMList = (_this$legendBoxDOM2 = this.legendBoxDOM) === null || _this$legendBoxDOM2 === void 0 ? void 0 : _this$legendBoxDOM2.getElementsByClassName('ev-chart-legend--table__row');
47802
47833
  rowDOMList.forEach(function (row) {
47803
47834
  var valueDOMList = row === null || row === void 0 ? void 0 : row.getElementsByClassName('ev-chart-legend--table__value');
47804
47835
  valueDOMList.forEach(function (dom) {
@@ -48090,13 +48121,13 @@ var plugins_legend_modules = {
48090
48121
  * @returns {undefined}
48091
48122
  */
48092
48123
  setLegendPosition: function setLegendPosition() {
48093
- var _opt$legend, _this$wrapperDOM, _this$legendDOM, _this$legendBoxDOM2, _this$resizeDOM, _opt$title, _opt$title2, _opt$legend2, _opt$legend$padding, _opt$legend3;
48124
+ var _opt$legend, _this$wrapperDOM, _this$legendDOM, _this$legendBoxDOM3, _this$resizeDOM, _opt$title, _opt$title2, _opt$legend2, _opt$legend$padding, _opt$legend3;
48094
48125
 
48095
48126
  var opt = this.options;
48096
48127
  var position = opt === null || opt === void 0 ? void 0 : (_opt$legend = opt.legend) === null || _opt$legend === void 0 ? void 0 : _opt$legend.position;
48097
48128
  var wrapperStyle = (_this$wrapperDOM = this.wrapperDOM) === null || _this$wrapperDOM === void 0 ? void 0 : _this$wrapperDOM.style;
48098
48129
  var legendStyle = (_this$legendDOM = this.legendDOM) === null || _this$legendDOM === void 0 ? void 0 : _this$legendDOM.style;
48099
- var boxStyle = (_this$legendBoxDOM2 = this.legendBoxDOM) === null || _this$legendBoxDOM2 === void 0 ? void 0 : _this$legendBoxDOM2.style;
48130
+ var boxStyle = (_this$legendBoxDOM3 = this.legendBoxDOM) === null || _this$legendBoxDOM3 === void 0 ? void 0 : _this$legendBoxDOM3.style;
48100
48131
  var resizeStyle = (_this$resizeDOM = this.resizeDOM) === null || _this$resizeDOM === void 0 ? void 0 : _this$resizeDOM.style;
48101
48132
  var chartRect;
48102
48133
  var legendPad;
@@ -48675,6 +48706,11 @@ var plugins_legend_gradient_modules = {
48675
48706
  return;
48676
48707
  }
48677
48708
 
48709
+ _this2.legendHover = {
48710
+ sId: 'gradient',
48711
+ type: _this2.options.type
48712
+ };
48713
+
48678
48714
  _this2.update({
48679
48715
  updateSeries: false,
48680
48716
  updateSelTip: {
@@ -48692,6 +48728,7 @@ var plugins_legend_gradient_modules = {
48692
48728
 
48693
48729
  this.onLegendBoxLeave = function () {
48694
48730
  _this2.legendDragInfo.dragging = false;
48731
+ _this2.legendHover = null;
48695
48732
 
48696
48733
  _this2.clearOverlay();
48697
48734
 
@@ -54115,6 +54152,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54115
54152
  };
54116
54153
  this.defaultSelectItemInfo = defaultSelectItemInfo;
54117
54154
  this.defaultSelectInfo = defaultSelectInfo;
54155
+ this.legendHover = null;
54118
54156
  }
54119
54157
  /**
54120
54158
  * Initialize chart object
@@ -54928,7 +54966,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54928
54966
  }, {
54929
54967
  key: "update",
54930
54968
  value: function update(updateInfo) {
54931
- var _this$updateScrollbar, _this$options$realTim2;
54969
+ var _this$updateScrollbar, _this$options$realTim2, _renderHitInfo, _this$legendHover;
54932
54970
 
54933
54971
  var options = this.options;
54934
54972
  var data = this.data.data;
@@ -55054,7 +55092,15 @@ var chart_core_EvChart = /*#__PURE__*/function () {
55054
55092
  this.axesX = this.createAxes('x', options.axesX);
55055
55093
  this.axesY = this.createAxes('y', options.axesY);
55056
55094
  this.initDefaultSelectInfo();
55057
- this.render(updateInfo === null || updateInfo === void 0 ? void 0 : updateInfo.hitInfo);
55095
+ var renderHitInfo = updateInfo === null || updateInfo === void 0 ? void 0 : updateInfo.hitInfo;
55096
+
55097
+ if (!((_renderHitInfo = renderHitInfo) !== null && _renderHitInfo !== void 0 && _renderHitInfo.legend) && (_this$legendHover = this.legendHover) !== null && _this$legendHover !== void 0 && _this$legendHover.sId) {
55098
+ renderHitInfo = _objectSpread2(_objectSpread2({}, renderHitInfo || {}), {}, {
55099
+ legend: this.legendHover
55100
+ });
55101
+ }
55102
+
55103
+ this.render(renderHitInfo);
55058
55104
  var isDragMove = this.dragInfo && this.drawSelectionArea;
55059
55105
 
55060
55106
  if (isDragMove) {