evui 3.4.119 → 3.4.122

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
@@ -11180,7 +11180,7 @@ module.exports = exports;
11180
11180
  /***/ "9224":
11181
11181
  /***/ (function(module) {
11182
11182
 
11183
- module.exports = JSON.parse("{\"a\":\"3.4.119\"}");
11183
+ module.exports = JSON.parse("{\"a\":\"3.4.122\"}");
11184
11184
 
11185
11185
  /***/ }),
11186
11186
 
@@ -42444,33 +42444,30 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
42444
42444
  }, {
42445
42445
  key: "defaultScatterDraw",
42446
42446
  value: function defaultScatterDraw(param) {
42447
- var _this2 = this;
42448
-
42449
42447
  var ctx = param.ctx,
42450
42448
  axesSteps = param.axesSteps,
42451
42449
  duple = param.duple,
42452
42450
  legendHitInfo = param.legendHitInfo;
42453
- var minmaxY = axesSteps.y[this.yAxisIndex];
42454
- this.data.forEach(function (item, idx) {
42455
- var shouldDraw = legendHitInfo ? legendHitInfo.sId === _this2.sId : !duple.has("".concat(item.x).concat(item.y));
42451
+ var minmaxY = axesSteps.y[this.yAxisIndex]; // Adjusted because Real Time Scatter is drawn from the back.
42456
42452
 
42457
- if (shouldDraw) {
42458
- if (!duple.has("".concat(item.x).concat(item.y))) {
42459
- duple.add("".concat(item.x).concat(item.y));
42460
- }
42453
+ for (var i = 0; i < this.data.length; i++) {
42454
+ var item = this.data[i];
42455
+ var idx = i;
42456
+ var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : duple.get("".concat(item.x).concat(item.y)) === this.sId;
42461
42457
 
42462
- _this2.calcItem(item, param);
42458
+ if (shouldDraw) {
42459
+ this.calcItem(item, param);
42463
42460
 
42464
42461
  if (item.xp !== null && item.yp !== null) {
42465
- var overflowColor = item.y > minmaxY.graphMax && _this2.overflowColor;
42466
- var color = overflowColor || item.dataColor || _this2.color;
42467
- ctx.strokeStyle = helpers_util.colorStringToRgba(color, _this2.getOpacity(param, color, idx));
42468
- var pointFillColor = item.dataColor || _this2.pointFill;
42469
- ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor, _this2.getOpacity(param, pointFillColor, idx));
42470
- helpers_canvas.drawPoint(ctx, _this2.pointStyle, _this2.pointSize, item.xp, item.yp);
42462
+ var overflowColor = item.y > minmaxY.graphMax && this.overflowColor;
42463
+ var color = overflowColor || item.dataColor || this.color;
42464
+ ctx.strokeStyle = helpers_util.colorStringToRgba(color, this.getOpacity(param, color, idx));
42465
+ var pointFillColor = item.dataColor || this.pointFill;
42466
+ ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor, this.getOpacity(param, pointFillColor, idx));
42467
+ helpers_canvas.drawPoint(ctx, this.pointStyle, this.pointSize, item.xp, item.yp);
42471
42468
  }
42472
42469
  }
42473
- });
42470
+ }
42474
42471
  }
42475
42472
  /**
42476
42473
  * Draw real time scatter chart
@@ -42497,13 +42494,9 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
42497
42494
  var _this$data$this$sId2, _this$data$this$sId2$, _this$data$this$sId3, _this$data$this$sId3$;
42498
42495
 
42499
42496
  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];
42500
- var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : !duple.has("".concat(item.x).concat(item.y));
42497
+ var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : duple.get("".concat(item.x).concat(item.y)) === this.sId;
42501
42498
 
42502
42499
  if (shouldDraw) {
42503
- if (!duple.has("".concat(item.x).concat(item.y))) {
42504
- duple.add("".concat(item.x).concat(item.y));
42505
- }
42506
-
42507
42500
  this.calcItem(item, param);
42508
42501
 
42509
42502
  if (item.xp !== null && item.yp !== null) {
@@ -54084,6 +54077,7 @@ var element_tip_modules = {
54084
54077
 
54085
54078
 
54086
54079
 
54080
+
54087
54081
 
54088
54082
 
54089
54083
  var chart_core_EvChart = /*#__PURE__*/function () {
@@ -54386,6 +54380,51 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54386
54380
  this.displayCtx.drawImage(this.bufferCanvas, 0, 0);
54387
54381
  }
54388
54382
  }
54383
+ /**
54384
+ * Collect duplicate point keys for scatter overlap detection
54385
+ * @param {Map<string, string>} duple
54386
+ * @param {string[]} chartTypeSet
54387
+ *
54388
+ * @returns {undefined}
54389
+ */
54390
+
54391
+ }, {
54392
+ key: "collectDuplicatePoints",
54393
+ value: function collectDuplicatePoints(duple, chartTypeSet) {
54394
+ var isReverseOrder = !!this.options.reverse;
54395
+
54396
+ for (var jx = isReverseOrder ? chartTypeSet.length - 1 : 0; isReverseOrder ? jx >= 0 : jx < chartTypeSet.length; isReverseOrder ? jx-- : jx++) {
54397
+ var _this$options$realTim;
54398
+
54399
+ var series = this.seriesList[chartTypeSet[jx]];
54400
+
54401
+ if ((_this$options$realTim = this.options.realTimeScatter) !== null && _this$options$realTim !== void 0 && _this$options$realTim.use) {
54402
+ var _series$data$series$s;
54403
+
54404
+ var seriesDatas = (_series$data$series$s = series.data[series.sId]) === null || _series$data$series$s === void 0 ? void 0 : _series$data$series$s.dataGroup;
54405
+
54406
+ for (var i = 0; i < seriesDatas.length; i++) {
54407
+ var _seriesDatas$i;
54408
+
54409
+ var dataItems = ((_seriesDatas$i = seriesDatas[i]) === null || _seriesDatas$i === void 0 ? void 0 : _seriesDatas$i.data) || [];
54410
+
54411
+ for (var j = 0; j < dataItems.length; j++) {
54412
+ var item = dataItems[j];
54413
+ duple.set("".concat(item.x).concat(item.y), series.sId);
54414
+ }
54415
+ }
54416
+ } else {
54417
+ var _this$data$data$chart;
54418
+
54419
+ var _seriesDatas = (_this$data$data$chart = this.data.data[chartTypeSet[jx]]) !== null && _this$data$data$chart !== void 0 ? _this$data$data$chart : [];
54420
+
54421
+ for (var _i = 0; _i < _seriesDatas.length; _i++) {
54422
+ var _item = _seriesDatas[_i];
54423
+ duple.set("".concat(_item.x).concat(_item.y), series.sId);
54424
+ }
54425
+ }
54426
+ }
54427
+ }
54389
54428
  /**
54390
54429
  * Draw each series
54391
54430
  * @param {any} [hitInfo=undefined] legend mouseover callback (object or undefined)
@@ -54437,13 +54476,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54437
54476
  showSeriesCount++;
54438
54477
  }
54439
54478
  });
54440
- var duple = new Set();
54479
+ /**
54480
+ * new Map<`${x}${y}`, seriesID>
54481
+ */
54482
+
54483
+ var duple = new Map();
54441
54484
  var chartKeys = Object.keys(this.seriesInfo.charts);
54442
54485
 
54443
54486
  for (var ix = 0; ix < chartKeys.length; ix++) {
54444
54487
  var chartType = chartKeys[ix];
54445
54488
  var chartTypeSet = this.seriesInfo.charts[chartType];
54446
54489
 
54490
+ if (chartType === 'scatter') {
54491
+ this.collectDuplicatePoints(duple, chartTypeSet);
54492
+ }
54493
+
54447
54494
  for (var jx = 0; jx < chartTypeSet.length; jx++) {
54448
54495
  var series = this.seriesList[chartTypeSet[jx]];
54449
54496
 
@@ -54522,8 +54569,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54522
54569
 
54523
54570
  case 'scatter':
54524
54571
  {
54525
- var _this$options$realTim;
54526
-
54527
54572
  var _legendHitInfo4 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
54528
54573
 
54529
54574
  var _selectInfo = void 0;
@@ -54544,7 +54589,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54544
54589
  }
54545
54590
  }
54546
54591
 
54547
- if ((_this$options$realTim = this.options.realTimeScatter) !== null && _this$options$realTim !== void 0 && _this$options$realTim.use) {
54592
+ if (this.options.seriesReverse) {
54548
54593
  series = this.seriesList[chartTypeSet.at(-1 - jx)];
54549
54594
  }
54550
54595
 
@@ -56195,7 +56240,8 @@ var DEFAULT_OPTIONS = {
56195
56240
  },
56196
56241
  error: '#FF0000',
56197
56242
  decimalPoint: 0
56198
- }
56243
+ },
56244
+ seriesReverse: false
56199
56245
  };
56200
56246
  var DEFAULT_DATA = {
56201
56247
  series: {},