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.
@@ -11171,7 +11171,7 @@ module.exports = exports;
11171
11171
  /***/ "9224":
11172
11172
  /***/ (function(module) {
11173
11173
 
11174
- module.exports = JSON.parse("{\"a\":\"3.4.119\"}");
11174
+ module.exports = JSON.parse("{\"a\":\"3.4.122\"}");
11175
11175
 
11176
11176
  /***/ }),
11177
11177
 
@@ -42435,33 +42435,30 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
42435
42435
  }, {
42436
42436
  key: "defaultScatterDraw",
42437
42437
  value: function defaultScatterDraw(param) {
42438
- var _this2 = this;
42439
-
42440
42438
  var ctx = param.ctx,
42441
42439
  axesSteps = param.axesSteps,
42442
42440
  duple = param.duple,
42443
42441
  legendHitInfo = param.legendHitInfo;
42444
- var minmaxY = axesSteps.y[this.yAxisIndex];
42445
- this.data.forEach(function (item, idx) {
42446
- var shouldDraw = legendHitInfo ? legendHitInfo.sId === _this2.sId : !duple.has("".concat(item.x).concat(item.y));
42442
+ var minmaxY = axesSteps.y[this.yAxisIndex]; // Adjusted because Real Time Scatter is drawn from the back.
42447
42443
 
42448
- if (shouldDraw) {
42449
- if (!duple.has("".concat(item.x).concat(item.y))) {
42450
- duple.add("".concat(item.x).concat(item.y));
42451
- }
42444
+ for (var i = 0; i < this.data.length; i++) {
42445
+ var item = this.data[i];
42446
+ var idx = i;
42447
+ var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : duple.get("".concat(item.x).concat(item.y)) === this.sId;
42452
42448
 
42453
- _this2.calcItem(item, param);
42449
+ if (shouldDraw) {
42450
+ this.calcItem(item, param);
42454
42451
 
42455
42452
  if (item.xp !== null && item.yp !== null) {
42456
- var overflowColor = item.y > minmaxY.graphMax && _this2.overflowColor;
42457
- var color = overflowColor || item.dataColor || _this2.color;
42458
- ctx.strokeStyle = helpers_util.colorStringToRgba(color, _this2.getOpacity(param, color, idx));
42459
- var pointFillColor = item.dataColor || _this2.pointFill;
42460
- ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor, _this2.getOpacity(param, pointFillColor, idx));
42461
- helpers_canvas.drawPoint(ctx, _this2.pointStyle, _this2.pointSize, item.xp, item.yp);
42453
+ var overflowColor = item.y > minmaxY.graphMax && this.overflowColor;
42454
+ var color = overflowColor || item.dataColor || this.color;
42455
+ ctx.strokeStyle = helpers_util.colorStringToRgba(color, this.getOpacity(param, color, idx));
42456
+ var pointFillColor = item.dataColor || this.pointFill;
42457
+ ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor, this.getOpacity(param, pointFillColor, idx));
42458
+ helpers_canvas.drawPoint(ctx, this.pointStyle, this.pointSize, item.xp, item.yp);
42462
42459
  }
42463
42460
  }
42464
- });
42461
+ }
42465
42462
  }
42466
42463
  /**
42467
42464
  * Draw real time scatter chart
@@ -42488,13 +42485,9 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
42488
42485
  var _this$data$this$sId2, _this$data$this$sId2$, _this$data$this$sId3, _this$data$this$sId3$;
42489
42486
 
42490
42487
  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];
42491
- var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : !duple.has("".concat(item.x).concat(item.y));
42488
+ var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : duple.get("".concat(item.x).concat(item.y)) === this.sId;
42492
42489
 
42493
42490
  if (shouldDraw) {
42494
- if (!duple.has("".concat(item.x).concat(item.y))) {
42495
- duple.add("".concat(item.x).concat(item.y));
42496
- }
42497
-
42498
42491
  this.calcItem(item, param);
42499
42492
 
42500
42493
  if (item.xp !== null && item.yp !== null) {
@@ -54075,6 +54068,7 @@ var element_tip_modules = {
54075
54068
 
54076
54069
 
54077
54070
 
54071
+
54078
54072
 
54079
54073
 
54080
54074
  var chart_core_EvChart = /*#__PURE__*/function () {
@@ -54377,6 +54371,51 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54377
54371
  this.displayCtx.drawImage(this.bufferCanvas, 0, 0);
54378
54372
  }
54379
54373
  }
54374
+ /**
54375
+ * Collect duplicate point keys for scatter overlap detection
54376
+ * @param {Map<string, string>} duple
54377
+ * @param {string[]} chartTypeSet
54378
+ *
54379
+ * @returns {undefined}
54380
+ */
54381
+
54382
+ }, {
54383
+ key: "collectDuplicatePoints",
54384
+ value: function collectDuplicatePoints(duple, chartTypeSet) {
54385
+ var isReverseOrder = !!this.options.reverse;
54386
+
54387
+ for (var jx = isReverseOrder ? chartTypeSet.length - 1 : 0; isReverseOrder ? jx >= 0 : jx < chartTypeSet.length; isReverseOrder ? jx-- : jx++) {
54388
+ var _this$options$realTim;
54389
+
54390
+ var series = this.seriesList[chartTypeSet[jx]];
54391
+
54392
+ if ((_this$options$realTim = this.options.realTimeScatter) !== null && _this$options$realTim !== void 0 && _this$options$realTim.use) {
54393
+ var _series$data$series$s;
54394
+
54395
+ var seriesDatas = (_series$data$series$s = series.data[series.sId]) === null || _series$data$series$s === void 0 ? void 0 : _series$data$series$s.dataGroup;
54396
+
54397
+ for (var i = 0; i < seriesDatas.length; i++) {
54398
+ var _seriesDatas$i;
54399
+
54400
+ var dataItems = ((_seriesDatas$i = seriesDatas[i]) === null || _seriesDatas$i === void 0 ? void 0 : _seriesDatas$i.data) || [];
54401
+
54402
+ for (var j = 0; j < dataItems.length; j++) {
54403
+ var item = dataItems[j];
54404
+ duple.set("".concat(item.x).concat(item.y), series.sId);
54405
+ }
54406
+ }
54407
+ } else {
54408
+ var _this$data$data$chart;
54409
+
54410
+ var _seriesDatas = (_this$data$data$chart = this.data.data[chartTypeSet[jx]]) !== null && _this$data$data$chart !== void 0 ? _this$data$data$chart : [];
54411
+
54412
+ for (var _i = 0; _i < _seriesDatas.length; _i++) {
54413
+ var _item = _seriesDatas[_i];
54414
+ duple.set("".concat(_item.x).concat(_item.y), series.sId);
54415
+ }
54416
+ }
54417
+ }
54418
+ }
54380
54419
  /**
54381
54420
  * Draw each series
54382
54421
  * @param {any} [hitInfo=undefined] legend mouseover callback (object or undefined)
@@ -54428,13 +54467,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54428
54467
  showSeriesCount++;
54429
54468
  }
54430
54469
  });
54431
- var duple = new Set();
54470
+ /**
54471
+ * new Map<`${x}${y}`, seriesID>
54472
+ */
54473
+
54474
+ var duple = new Map();
54432
54475
  var chartKeys = Object.keys(this.seriesInfo.charts);
54433
54476
 
54434
54477
  for (var ix = 0; ix < chartKeys.length; ix++) {
54435
54478
  var chartType = chartKeys[ix];
54436
54479
  var chartTypeSet = this.seriesInfo.charts[chartType];
54437
54480
 
54481
+ if (chartType === 'scatter') {
54482
+ this.collectDuplicatePoints(duple, chartTypeSet);
54483
+ }
54484
+
54438
54485
  for (var jx = 0; jx < chartTypeSet.length; jx++) {
54439
54486
  var series = this.seriesList[chartTypeSet[jx]];
54440
54487
 
@@ -54513,8 +54560,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54513
54560
 
54514
54561
  case 'scatter':
54515
54562
  {
54516
- var _this$options$realTim;
54517
-
54518
54563
  var _legendHitInfo4 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
54519
54564
 
54520
54565
  var _selectInfo = void 0;
@@ -54535,7 +54580,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54535
54580
  }
54536
54581
  }
54537
54582
 
54538
- if ((_this$options$realTim = this.options.realTimeScatter) !== null && _this$options$realTim !== void 0 && _this$options$realTim.use) {
54583
+ if (this.options.seriesReverse) {
54539
54584
  series = this.seriesList[chartTypeSet.at(-1 - jx)];
54540
54585
  }
54541
54586
 
@@ -56186,7 +56231,8 @@ var DEFAULT_OPTIONS = {
56186
56231
  },
56187
56232
  error: '#FF0000',
56188
56233
  decimalPoint: 0
56189
- }
56234
+ },
56235
+ seriesReverse: false
56190
56236
  };
56191
56237
  var DEFAULT_DATA = {
56192
56238
  series: {},