evui 3.4.125 → 3.4.127
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 +50 -21
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +50 -21
- 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 +15 -12
- package/src/components/chart/plugins/plugins.interaction.js +25 -2
package/package.json
CHANGED
|
@@ -272,21 +272,24 @@ class EvChart {
|
|
|
272
272
|
isReverseOrder ? jx-- : jx++
|
|
273
273
|
) {
|
|
274
274
|
const series = this.seriesList[chartTypeSet[jx]];
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
for (let
|
|
280
|
-
const
|
|
275
|
+
const shouldInclude = !!series?.show;
|
|
276
|
+
if (shouldInclude) {
|
|
277
|
+
if (this.options.realTimeScatter?.use) {
|
|
278
|
+
const seriesDatas = series.data[series.sId]?.dataGroup;
|
|
279
|
+
for (let i = 0; i < seriesDatas.length; i++) {
|
|
280
|
+
const dataItems = seriesDatas[i]?.data || [];
|
|
281
|
+
for (let j = 0; j < dataItems.length; j++) {
|
|
282
|
+
const item = dataItems[j];
|
|
283
|
+
duple.set(`${item.x}${item.y}`, series.sId);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
} else {
|
|
287
|
+
const seriesDatas = this.data.data[chartTypeSet[jx]] ?? [];
|
|
288
|
+
for (let i = 0; i < seriesDatas.length; i++) {
|
|
289
|
+
const item = seriesDatas[i];
|
|
281
290
|
duple.set(`${item.x}${item.y}`, series.sId);
|
|
282
291
|
}
|
|
283
292
|
}
|
|
284
|
-
} else {
|
|
285
|
-
const seriesDatas = this.data.data[chartTypeSet[jx]] ?? [];
|
|
286
|
-
for (let i = 0; i < seriesDatas.length; i++) {
|
|
287
|
-
const item = seriesDatas[i];
|
|
288
|
-
duple.set(`${item.x}${item.y}`, series.sId);
|
|
289
|
-
}
|
|
290
293
|
}
|
|
291
294
|
}
|
|
292
295
|
}
|
|
@@ -37,7 +37,22 @@ const modules = {
|
|
|
37
37
|
if (tooltip.use && this.isInitTooltip) {
|
|
38
38
|
this.drawItemsHighlight(hitInfo, ctx);
|
|
39
39
|
|
|
40
|
-
if (tooltip?.
|
|
40
|
+
if (typeof tooltip?.returnValue === 'function') {
|
|
41
|
+
const seriesList = [];
|
|
42
|
+
Object.keys(hitInfo.items).forEach((sId) => {
|
|
43
|
+
seriesList.push({
|
|
44
|
+
sId,
|
|
45
|
+
data: hitInfo.items[sId].data,
|
|
46
|
+
color: hitInfo.items[sId].color,
|
|
47
|
+
name: hitInfo.items[sId].name,
|
|
48
|
+
dataId: hitInfo.items[sId].id,
|
|
49
|
+
index: hitInfo.items[sId].index,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
this.hideTooltipDOM();
|
|
54
|
+
tooltip.returnValue(seriesList, e);
|
|
55
|
+
} else if (tooltip?.formatter?.html) {
|
|
41
56
|
this.drawCustomTooltip(hitInfo?.items);
|
|
42
57
|
this.setCustomTooltipLayoutPosition(hitInfo, e);
|
|
43
58
|
} else {
|
|
@@ -52,6 +67,10 @@ const modules = {
|
|
|
52
67
|
}
|
|
53
68
|
}
|
|
54
69
|
} else if (tooltip.use && this.isInitTooltip) {
|
|
70
|
+
if (typeof tooltip?.returnValue === 'function') {
|
|
71
|
+
tooltip.returnValue([], e);
|
|
72
|
+
}
|
|
73
|
+
|
|
55
74
|
this.hideTooltipDOM();
|
|
56
75
|
}
|
|
57
76
|
|
|
@@ -88,7 +107,7 @@ const modules = {
|
|
|
88
107
|
* @returns {undefined}
|
|
89
108
|
*/
|
|
90
109
|
|
|
91
|
-
this.onMouseLeave = () => {
|
|
110
|
+
this.onMouseLeave = (e) => {
|
|
92
111
|
const { tooltip, dragSelection } = this.options;
|
|
93
112
|
|
|
94
113
|
if (tooltip.throttledMove) {
|
|
@@ -100,6 +119,10 @@ const modules = {
|
|
|
100
119
|
}
|
|
101
120
|
|
|
102
121
|
if (tooltip.use && this.isInitTooltip) {
|
|
122
|
+
if (typeof tooltip?.returnValue === 'function') {
|
|
123
|
+
tooltip.returnValue([], e);
|
|
124
|
+
}
|
|
125
|
+
|
|
103
126
|
this.tooltipClear();
|
|
104
127
|
}
|
|
105
128
|
this.listeners['mouse-leave']();
|