evui 3.4.200 → 3.4.201
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.common.js +84 -36
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +84 -36
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chart/chart.core.js +44 -2
- package/src/components/chart/element/element.scatter.js +7 -12
- package/src/components/chart/model/model.store.js +8 -5
- package/src/components/chart/scale/scale.js +2 -2
- package/src/components/chart/uses.js +1 -0
package/dist/evui.common.js
CHANGED
|
@@ -11171,7 +11171,7 @@ module.exports = exports;
|
|
|
11171
11171
|
/***/ "9224":
|
|
11172
11172
|
/***/ (function(module) {
|
|
11173
11173
|
|
|
11174
|
-
module.exports = JSON.parse("{\"a\":\"3.4.
|
|
11174
|
+
module.exports = JSON.parse("{\"a\":\"3.4.201\"}");
|
|
11175
11175
|
|
|
11176
11176
|
/***/ }),
|
|
11177
11177
|
|
|
@@ -39247,7 +39247,7 @@ var modules = {
|
|
|
39247
39247
|
var baseData = baseDataList[dataIndex];
|
|
39248
39248
|
var position = isHorizontal ? baseData === null || baseData === void 0 ? void 0 : baseData.x : baseData === null || baseData === void 0 ? void 0 : baseData.y;
|
|
39249
39249
|
var baseValue = baseData === null || baseData === void 0 ? void 0 : baseData.o;
|
|
39250
|
-
var isPassingValue = baseSeries.passingValue === baseValue;
|
|
39250
|
+
var isPassingValue = !helpers_util.isNullOrUndefined(baseSeries === null || baseSeries === void 0 ? void 0 : baseSeries.passingValue) && (baseSeries === null || baseSeries === void 0 ? void 0 : baseSeries.passingValue) === baseValue;
|
|
39251
39251
|
var isSameSign = curr >= 0 && baseValue >= 0 || curr < 0 && baseValue < 0;
|
|
39252
39252
|
|
|
39253
39253
|
if (isPassingValue || position == null || !isSameSign || !baseSeries.show) {
|
|
@@ -39457,6 +39457,7 @@ var modules = {
|
|
|
39457
39457
|
var isHorizontal = this.options.horizontal;
|
|
39458
39458
|
|
|
39459
39459
|
if (data.length) {
|
|
39460
|
+
var usePassingValue = !helpers_util.isNullOrUndefined(passingValue);
|
|
39460
39461
|
return data.reduce(function (acc, p, index) {
|
|
39461
39462
|
var _p$x, _p$y, _p$o;
|
|
39462
39463
|
|
|
@@ -39465,15 +39466,15 @@ var modules = {
|
|
|
39465
39466
|
var py = ((_p$y = p.y) === null || _p$y === void 0 ? void 0 : _p$y.value) || p.y;
|
|
39466
39467
|
var po = ((_p$o = p.o) === null || _p$o === void 0 ? void 0 : _p$o.value) || p.o;
|
|
39467
39468
|
|
|
39468
|
-
if (po !== passingValue && px <= minmax.minX) {
|
|
39469
|
+
if (usePassingValue ? po !== passingValue && px <= minmax.minX : px <= minmax.minX) {
|
|
39469
39470
|
minmax.minX = px === null ? 0 : px;
|
|
39470
39471
|
}
|
|
39471
39472
|
|
|
39472
|
-
if (po !== passingValue && py <= minmax.minY) {
|
|
39473
|
+
if (usePassingValue ? po !== passingValue && py <= minmax.minY : py <= minmax.minY) {
|
|
39473
39474
|
minmax.minY = py === null ? 0 : py;
|
|
39474
39475
|
}
|
|
39475
39476
|
|
|
39476
|
-
if (po !== passingValue && px >= minmax.maxX) {
|
|
39477
|
+
if (usePassingValue ? po !== passingValue && px >= minmax.maxX : px >= minmax.maxX) {
|
|
39477
39478
|
minmax.maxX = px === null ? 0 : px;
|
|
39478
39479
|
|
|
39479
39480
|
if (isHorizontal && px !== null) {
|
|
@@ -39482,7 +39483,7 @@ var modules = {
|
|
|
39482
39483
|
}
|
|
39483
39484
|
}
|
|
39484
39485
|
|
|
39485
|
-
if (po !== passingValue && py >= minmax.maxY) {
|
|
39486
|
+
if (usePassingValue ? po !== passingValue && py >= minmax.maxY : py >= minmax.maxY) {
|
|
39486
39487
|
minmax.maxY = py === null ? 0 : py;
|
|
39487
39488
|
|
|
39488
39489
|
if (!isHorizontal && py !== null) {
|
|
@@ -42456,33 +42457,30 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
|
42456
42457
|
}, {
|
|
42457
42458
|
key: "defaultScatterDraw",
|
|
42458
42459
|
value: function defaultScatterDraw(param) {
|
|
42459
|
-
var _this2 = this;
|
|
42460
|
-
|
|
42461
42460
|
var ctx = param.ctx,
|
|
42462
42461
|
axesSteps = param.axesSteps,
|
|
42463
42462
|
duple = param.duple,
|
|
42464
42463
|
legendHitInfo = param.legendHitInfo;
|
|
42465
|
-
var minmaxY = axesSteps.y[this.yAxisIndex];
|
|
42466
|
-
this.data.forEach(function (item, idx) {
|
|
42467
|
-
var shouldDraw = legendHitInfo ? legendHitInfo.sId === _this2.sId : !duple.has("".concat(item.x).concat(item.y));
|
|
42464
|
+
var minmaxY = axesSteps.y[this.yAxisIndex]; // Adjusted because Real Time Scatter is drawn from the back.
|
|
42468
42465
|
|
|
42469
|
-
|
|
42470
|
-
|
|
42471
|
-
|
|
42472
|
-
|
|
42466
|
+
for (var i = 0; i < this.data.length; i++) {
|
|
42467
|
+
var item = this.data[i];
|
|
42468
|
+
var idx = i;
|
|
42469
|
+
var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : duple.get("".concat(item.x).concat(item.y)) === this.sId;
|
|
42473
42470
|
|
|
42474
|
-
|
|
42471
|
+
if (shouldDraw) {
|
|
42472
|
+
this.calcItem(item, param);
|
|
42475
42473
|
|
|
42476
42474
|
if (item.xp !== null && item.yp !== null) {
|
|
42477
|
-
var overflowColor = item.y > minmaxY.graphMax &&
|
|
42478
|
-
var color = overflowColor || item.dataColor ||
|
|
42479
|
-
ctx.strokeStyle = helpers_util.colorStringToRgba(color,
|
|
42480
|
-
var pointFillColor = item.dataColor ||
|
|
42481
|
-
ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor,
|
|
42482
|
-
helpers_canvas.drawPoint(ctx,
|
|
42475
|
+
var overflowColor = item.y > minmaxY.graphMax && this.overflowColor;
|
|
42476
|
+
var color = overflowColor || item.dataColor || this.color;
|
|
42477
|
+
ctx.strokeStyle = helpers_util.colorStringToRgba(color, this.getOpacity(param, color, idx));
|
|
42478
|
+
var pointFillColor = item.dataColor || this.pointFill;
|
|
42479
|
+
ctx.fillStyle = helpers_util.colorStringToRgba(pointFillColor, this.getOpacity(param, pointFillColor, idx));
|
|
42480
|
+
helpers_canvas.drawPoint(ctx, this.pointStyle, this.pointSize, item.xp, item.yp);
|
|
42483
42481
|
}
|
|
42484
42482
|
}
|
|
42485
|
-
}
|
|
42483
|
+
}
|
|
42486
42484
|
}
|
|
42487
42485
|
/**
|
|
42488
42486
|
* Draw real time scatter chart
|
|
@@ -42509,13 +42507,9 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
|
42509
42507
|
var _this$data$this$sId2, _this$data$this$sId2$, _this$data$this$sId3, _this$data$this$sId3$;
|
|
42510
42508
|
|
|
42511
42509
|
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];
|
|
42512
|
-
var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId :
|
|
42510
|
+
var shouldDraw = legendHitInfo ? legendHitInfo.sId === this.sId : duple.get("".concat(item.x).concat(item.y)) === this.sId;
|
|
42513
42511
|
|
|
42514
42512
|
if (shouldDraw) {
|
|
42515
|
-
if (!duple.has("".concat(item.x).concat(item.y))) {
|
|
42516
|
-
duple.add("".concat(item.x).concat(item.y));
|
|
42517
|
-
}
|
|
42518
|
-
|
|
42519
42513
|
this.calcItem(item, param);
|
|
42520
42514
|
|
|
42521
42515
|
if (item.xp !== null && item.yp !== null) {
|
|
@@ -45510,9 +45504,6 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
45510
45504
|
var mergedPlotLineOpt = lodash_es_defaultsDeep({}, plotLine, PLOT_LINE_OPTION);
|
|
45511
45505
|
var value = mergedPlotLineOpt.value,
|
|
45512
45506
|
labelOpt = mergedPlotLineOpt.label;
|
|
45513
|
-
|
|
45514
|
-
_this3.setPlotLineStyle(mergedPlotLineOpt);
|
|
45515
|
-
|
|
45516
45507
|
var dataPos;
|
|
45517
45508
|
|
|
45518
45509
|
if (_this3.type === 'x') {
|
|
@@ -45522,6 +45513,8 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
45522
45513
|
return;
|
|
45523
45514
|
}
|
|
45524
45515
|
|
|
45516
|
+
_this3.setPlotLineStyle(mergedPlotLineOpt);
|
|
45517
|
+
|
|
45525
45518
|
_this3.drawXPlotLine(dataPos, minX, maxX, minY, maxY);
|
|
45526
45519
|
} else {
|
|
45527
45520
|
dataPos = helpers_canvas.calculateY(value, axisMin, axisMax, yArea, maxY);
|
|
@@ -45530,6 +45523,8 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
45530
45523
|
return;
|
|
45531
45524
|
}
|
|
45532
45525
|
|
|
45526
|
+
_this3.setPlotLineStyle(mergedPlotLineOpt);
|
|
45527
|
+
|
|
45533
45528
|
_this3.drawYPlotLine(dataPos, minX, maxX, minY, maxY);
|
|
45534
45529
|
}
|
|
45535
45530
|
|
|
@@ -54389,6 +54384,7 @@ var element_tip_modules = {
|
|
|
54389
54384
|
|
|
54390
54385
|
|
|
54391
54386
|
|
|
54387
|
+
|
|
54392
54388
|
|
|
54393
54389
|
|
|
54394
54390
|
var chart_core_EvChart = /*#__PURE__*/function () {
|
|
@@ -54691,6 +54687,51 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
54691
54687
|
this.displayCtx.drawImage(this.bufferCanvas, 0, 0);
|
|
54692
54688
|
}
|
|
54693
54689
|
}
|
|
54690
|
+
/**
|
|
54691
|
+
* Collect duplicate point keys for scatter overlap detection
|
|
54692
|
+
* @param {Map<string, string>} duple
|
|
54693
|
+
* @param {string[]} chartTypeSet
|
|
54694
|
+
*
|
|
54695
|
+
* @returns {undefined}
|
|
54696
|
+
*/
|
|
54697
|
+
|
|
54698
|
+
}, {
|
|
54699
|
+
key: "collectDuplicatePoints",
|
|
54700
|
+
value: function collectDuplicatePoints(duple, chartTypeSet) {
|
|
54701
|
+
var isReverseOrder = !!this.options.seriesReverse;
|
|
54702
|
+
|
|
54703
|
+
for (var jx = isReverseOrder ? chartTypeSet.length - 1 : 0; isReverseOrder ? jx >= 0 : jx < chartTypeSet.length; isReverseOrder ? jx-- : jx++) {
|
|
54704
|
+
var _this$options$realTim;
|
|
54705
|
+
|
|
54706
|
+
var series = this.seriesList[chartTypeSet[jx]];
|
|
54707
|
+
|
|
54708
|
+
if ((_this$options$realTim = this.options.realTimeScatter) !== null && _this$options$realTim !== void 0 && _this$options$realTim.use) {
|
|
54709
|
+
var _series$data$series$s;
|
|
54710
|
+
|
|
54711
|
+
var seriesDatas = (_series$data$series$s = series.data[series.sId]) === null || _series$data$series$s === void 0 ? void 0 : _series$data$series$s.dataGroup;
|
|
54712
|
+
|
|
54713
|
+
for (var i = 0; i < seriesDatas.length; i++) {
|
|
54714
|
+
var _seriesDatas$i;
|
|
54715
|
+
|
|
54716
|
+
var dataItems = ((_seriesDatas$i = seriesDatas[i]) === null || _seriesDatas$i === void 0 ? void 0 : _seriesDatas$i.data) || [];
|
|
54717
|
+
|
|
54718
|
+
for (var j = 0; j < dataItems.length; j++) {
|
|
54719
|
+
var item = dataItems[j];
|
|
54720
|
+
duple.set("".concat(item.x).concat(item.y), series.sId);
|
|
54721
|
+
}
|
|
54722
|
+
}
|
|
54723
|
+
} else {
|
|
54724
|
+
var _this$data$data$chart;
|
|
54725
|
+
|
|
54726
|
+
var _seriesDatas = (_this$data$data$chart = this.data.data[chartTypeSet[jx]]) !== null && _this$data$data$chart !== void 0 ? _this$data$data$chart : [];
|
|
54727
|
+
|
|
54728
|
+
for (var _i = 0; _i < _seriesDatas.length; _i++) {
|
|
54729
|
+
var _item = _seriesDatas[_i];
|
|
54730
|
+
duple.set("".concat(_item.x).concat(_item.y), series.sId);
|
|
54731
|
+
}
|
|
54732
|
+
}
|
|
54733
|
+
}
|
|
54734
|
+
}
|
|
54694
54735
|
/**
|
|
54695
54736
|
* Draw each series
|
|
54696
54737
|
* @param {any} [hitInfo=undefined] legend mouseover callback (object or undefined)
|
|
@@ -54742,13 +54783,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
54742
54783
|
showSeriesCount++;
|
|
54743
54784
|
}
|
|
54744
54785
|
});
|
|
54745
|
-
|
|
54786
|
+
/**
|
|
54787
|
+
* new Map<`${x}${y}`, seriesID>
|
|
54788
|
+
*/
|
|
54789
|
+
|
|
54790
|
+
var duple = new Map();
|
|
54746
54791
|
var chartKeys = Object.keys(this.seriesInfo.charts);
|
|
54747
54792
|
|
|
54748
54793
|
for (var ix = 0; ix < chartKeys.length; ix++) {
|
|
54749
54794
|
var chartType = chartKeys[ix];
|
|
54750
54795
|
var chartTypeSet = this.seriesInfo.charts[chartType];
|
|
54751
54796
|
|
|
54797
|
+
if (chartType === 'scatter') {
|
|
54798
|
+
this.collectDuplicatePoints(duple, chartTypeSet);
|
|
54799
|
+
}
|
|
54800
|
+
|
|
54752
54801
|
for (var jx = 0; jx < chartTypeSet.length; jx++) {
|
|
54753
54802
|
var series = this.seriesList[chartTypeSet[jx]];
|
|
54754
54803
|
|
|
@@ -54827,8 +54876,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
54827
54876
|
|
|
54828
54877
|
case 'scatter':
|
|
54829
54878
|
{
|
|
54830
|
-
var _this$options$realTim;
|
|
54831
|
-
|
|
54832
54879
|
var _legendHitInfo4 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
54833
54880
|
|
|
54834
54881
|
var _selectInfo = void 0;
|
|
@@ -54849,7 +54896,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
54849
54896
|
}
|
|
54850
54897
|
}
|
|
54851
54898
|
|
|
54852
|
-
if (
|
|
54899
|
+
if (this.options.seriesReverse) {
|
|
54853
54900
|
series = this.seriesList[chartTypeSet.at(-1 - jx)];
|
|
54854
54901
|
}
|
|
54855
54902
|
|
|
@@ -56500,7 +56547,8 @@ var DEFAULT_OPTIONS = {
|
|
|
56500
56547
|
},
|
|
56501
56548
|
error: '#FF0000',
|
|
56502
56549
|
decimalPoint: 0
|
|
56503
|
-
}
|
|
56550
|
+
},
|
|
56551
|
+
seriesReverse: false
|
|
56504
56552
|
};
|
|
56505
56553
|
var DEFAULT_DATA = {
|
|
56506
56554
|
series: {},
|