onesight-charts 1.4.2 → 1.4.4
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/onesight-charts.min.css +1 -1
- package/dist/onesight-charts.min.js +1 -1
- package/es/components/common-bar/demo/base.js +50 -50
- package/es/components/common-bar/demo/diverging.js +48 -76
- package/es/components/common-bar/demo/yIcon.js +24 -12
- package/es/components/common-bar/index.js +253 -298
- package/es/components/common-bar/style.scss +13 -2
- package/es/components/pie/demo/demo.js +18 -9
- package/es/components/pie/style.scss +15 -1
- package/es/components/pie/tooltipConfig.js +1 -1
- package/es/components/stacked-bar/demo/base.js +56 -28
- package/es/components/stacked-bar/index.js +5 -1
- package/es/components/stacked-bar/style.scss +14 -1
- package/lib/components/common-bar/demo/base.js +50 -52
- package/lib/components/common-bar/demo/diverging.js +48 -80
- package/lib/components/common-bar/demo/yIcon.js +24 -12
- package/lib/components/common-bar/index.js +242 -291
- package/lib/components/common-bar/style.scss +13 -2
- package/lib/components/pie/demo/demo.js +18 -9
- package/lib/components/pie/style.scss +15 -1
- package/lib/components/pie/tooltipConfig.js +1 -0
- package/lib/components/stacked-bar/demo/base.js +56 -28
- package/lib/components/stacked-bar/index.js +7 -3
- package/lib/components/stacked-bar/style.scss +14 -1
- package/package.json +1 -1
|
@@ -7,17 +7,28 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.onesight-chart-common-bar-tooltip-box {
|
|
10
|
-
.tooltip-head
|
|
10
|
+
.tooltip-head,
|
|
11
|
+
.tooltip-time {
|
|
11
12
|
white-space: nowrap;
|
|
12
13
|
overflow: hidden;
|
|
13
14
|
text-overflow: ellipsis;
|
|
14
|
-
border-bottom: 1px solid #eeeeee;
|
|
15
|
+
// border-bottom: 1px solid #eeeeee;
|
|
15
16
|
padding: 10px 16px 10px;
|
|
16
17
|
font-weight: bold;
|
|
17
18
|
font-size: 15px;
|
|
18
19
|
color: #364141;
|
|
19
20
|
line-height: 22px;
|
|
20
21
|
}
|
|
22
|
+
.tooltip-head {
|
|
23
|
+
padding-bottom: 0;
|
|
24
|
+
}
|
|
25
|
+
.tooltip-time {
|
|
26
|
+
font-weight: 400;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
border-bottom: 1px solid #eeeeee;
|
|
29
|
+
padding-top: 4px;
|
|
30
|
+
padding-bottom: 4px;
|
|
31
|
+
}
|
|
21
32
|
.tooltip-body {
|
|
22
33
|
padding: 8px;
|
|
23
34
|
max-height: 213.64px;
|
|
@@ -41,7 +41,8 @@ var seriesData = [
|
|
|
41
41
|
value: 1801,
|
|
42
42
|
percentage: 49.06,
|
|
43
43
|
color: "#1DA9A0",
|
|
44
|
-
platformIcon: "/img/news.svg"
|
|
44
|
+
platformIcon: "/img/news.svg",
|
|
45
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
48
|
name: "所有人可见2",
|
|
@@ -49,7 +50,8 @@ var seriesData = [
|
|
|
49
50
|
value: 1559,
|
|
50
51
|
percentage: 42.47,
|
|
51
52
|
color: "#5274E8",
|
|
52
|
-
platformIcon: "/img/news.svg"
|
|
53
|
+
platformIcon: "/img/news.svg",
|
|
54
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
53
55
|
},
|
|
54
56
|
{
|
|
55
57
|
name: "Twitter",
|
|
@@ -57,7 +59,8 @@ var seriesData = [
|
|
|
57
59
|
value: 291,
|
|
58
60
|
percentage: 7.93,
|
|
59
61
|
color: "#F8AF1D",
|
|
60
|
-
platformIcon: "/img/news.svg"
|
|
62
|
+
platformIcon: "/img/news.svg",
|
|
63
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
61
64
|
},
|
|
62
65
|
{
|
|
63
66
|
name: "@alfacases2025",
|
|
@@ -65,7 +68,8 @@ var seriesData = [
|
|
|
65
68
|
value: 9,
|
|
66
69
|
percentage: 0.25,
|
|
67
70
|
color: "#D54CB6",
|
|
68
|
-
platformIcon: "/img/news.svg"
|
|
71
|
+
platformIcon: "/img/news.svg",
|
|
72
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
69
73
|
},
|
|
70
74
|
{
|
|
71
75
|
name: "@BeNoBillionaire",
|
|
@@ -73,7 +77,8 @@ var seriesData = [
|
|
|
73
77
|
value: 5,
|
|
74
78
|
percentage: 0.14,
|
|
75
79
|
color: "#51A6E6",
|
|
76
|
-
platformIcon: "/img/news.svg"
|
|
80
|
+
platformIcon: "/img/news.svg",
|
|
81
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
77
82
|
},
|
|
78
83
|
{
|
|
79
84
|
name: "@LeonChaland",
|
|
@@ -81,7 +86,8 @@ var seriesData = [
|
|
|
81
86
|
value: 3,
|
|
82
87
|
percentage: 0.08,
|
|
83
88
|
color: "#CB3432",
|
|
84
|
-
platformIcon: "/img/news.svg"
|
|
89
|
+
platformIcon: "/img/news.svg",
|
|
90
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
85
91
|
},
|
|
86
92
|
{
|
|
87
93
|
name: "@AppleTLDR",
|
|
@@ -89,7 +95,8 @@ var seriesData = [
|
|
|
89
95
|
value: 3,
|
|
90
96
|
percentage: 0.08,
|
|
91
97
|
color: "#EE6666",
|
|
92
|
-
platformIcon: "/img/news.svg"
|
|
98
|
+
platformIcon: "/img/news.svg",
|
|
99
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
93
100
|
},
|
|
94
101
|
{
|
|
95
102
|
name: "销毁dom",
|
|
@@ -97,7 +104,8 @@ var seriesData = [
|
|
|
97
104
|
value: 0,
|
|
98
105
|
percentage: 0,
|
|
99
106
|
color: "#6C5CCE",
|
|
100
|
-
platformIcon: "/img/news.svg"
|
|
107
|
+
platformIcon: "/img/news.svg",
|
|
108
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
101
109
|
},
|
|
102
110
|
{
|
|
103
111
|
name: "所有人可见1",
|
|
@@ -105,7 +113,8 @@ var seriesData = [
|
|
|
105
113
|
value: 0,
|
|
106
114
|
percentage: 0,
|
|
107
115
|
color: "#57C464",
|
|
108
|
-
platformIcon: "/img/news.svg"
|
|
116
|
+
platformIcon: "/img/news.svg",
|
|
117
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
109
118
|
}
|
|
110
119
|
];
|
|
111
120
|
var handleClick = (type, params) => {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.tooltip-head {
|
|
33
|
-
border-bottom: 1px solid #eeeeee;
|
|
33
|
+
// border-bottom: 1px solid #eeeeee;
|
|
34
34
|
padding: 10px 16px 10px;
|
|
35
35
|
font-weight: bold;
|
|
36
36
|
font-size: 15px;
|
|
@@ -40,6 +40,20 @@
|
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
}
|
|
43
|
+
.tooltip-head {
|
|
44
|
+
padding-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
.tooltip-time {
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
font-size: 12px;
|
|
49
|
+
border-bottom: 1px solid #eeeeee;
|
|
50
|
+
padding: 4px 16px;
|
|
51
|
+
color: #364141;
|
|
52
|
+
line-height: 22px;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
}
|
|
43
57
|
|
|
44
58
|
.tooltip-body {
|
|
45
59
|
display: flex;
|
|
@@ -69,6 +69,7 @@ var createCustomTooltip = ({
|
|
|
69
69
|
return `
|
|
70
70
|
<div>
|
|
71
71
|
<div class='tooltip-head'>${item.name}</div>
|
|
72
|
+
${(item == null ? void 0 : item.currentTime) ? `<div class="tooltip-time">${item.currentTime}</div>` : ""}
|
|
72
73
|
<div class='tooltip-body'>
|
|
73
74
|
<div class='tooltip-body-c-1'>
|
|
74
75
|
<span style="background: ${bg_color}"></span>
|
|
@@ -71,7 +71,8 @@ var series = [
|
|
|
71
71
|
yDataName: "en",
|
|
72
72
|
name: "英语",
|
|
73
73
|
value: 104,
|
|
74
|
-
platformIcon: "/img/news.svg"
|
|
74
|
+
platformIcon: "/img/news.svg",
|
|
75
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
total: 276,
|
|
@@ -80,7 +81,8 @@ var series = [
|
|
|
80
81
|
yDataName: "zh",
|
|
81
82
|
name: "中文",
|
|
82
83
|
value: 276,
|
|
83
|
-
platformIcon: "/img/news.svg"
|
|
84
|
+
platformIcon: "/img/news.svg",
|
|
85
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
84
86
|
},
|
|
85
87
|
{
|
|
86
88
|
total: 19,
|
|
@@ -89,7 +91,8 @@ var series = [
|
|
|
89
91
|
yDataName: "jp",
|
|
90
92
|
name: "日语",
|
|
91
93
|
value: 19,
|
|
92
|
-
platformIcon: "/img/news.svg"
|
|
94
|
+
platformIcon: "/img/news.svg",
|
|
95
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
93
96
|
},
|
|
94
97
|
{
|
|
95
98
|
total: 19,
|
|
@@ -98,7 +101,8 @@ var series = [
|
|
|
98
101
|
yDataName: "es",
|
|
99
102
|
name: "西班牙语",
|
|
100
103
|
value: 19,
|
|
101
|
-
platformIcon: "/img/news.svg"
|
|
104
|
+
platformIcon: "/img/news.svg",
|
|
105
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
102
106
|
},
|
|
103
107
|
{
|
|
104
108
|
total: 40,
|
|
@@ -107,7 +111,8 @@ var series = [
|
|
|
107
111
|
yDataName: "ko",
|
|
108
112
|
name: "韩语",
|
|
109
113
|
value: 40,
|
|
110
|
-
platformIcon: "/img/news.svg"
|
|
114
|
+
platformIcon: "/img/news.svg",
|
|
115
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
111
116
|
},
|
|
112
117
|
{
|
|
113
118
|
total: 7,
|
|
@@ -116,7 +121,8 @@ var series = [
|
|
|
116
121
|
yDataName: "fr",
|
|
117
122
|
name: "法语",
|
|
118
123
|
value: 7,
|
|
119
|
-
platformIcon: "/img/news.svg"
|
|
124
|
+
platformIcon: "/img/news.svg",
|
|
125
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
120
126
|
},
|
|
121
127
|
{
|
|
122
128
|
total: 8,
|
|
@@ -125,7 +131,8 @@ var series = [
|
|
|
125
131
|
yDataName: "vi",
|
|
126
132
|
name: "越南语",
|
|
127
133
|
value: 8,
|
|
128
|
-
platformIcon: "/img/news.svg"
|
|
134
|
+
platformIcon: "/img/news.svg",
|
|
135
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
129
136
|
}
|
|
130
137
|
]
|
|
131
138
|
},
|
|
@@ -156,7 +163,8 @@ var series = [
|
|
|
156
163
|
yDataName: "en",
|
|
157
164
|
name: "英语",
|
|
158
165
|
value: 210,
|
|
159
|
-
platformIcon: "/img/news.svg"
|
|
166
|
+
platformIcon: "/img/news.svg",
|
|
167
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
160
168
|
},
|
|
161
169
|
{
|
|
162
170
|
total: 3,
|
|
@@ -165,7 +173,8 @@ var series = [
|
|
|
165
173
|
yDataName: "zh",
|
|
166
174
|
name: "中文",
|
|
167
175
|
value: 3,
|
|
168
|
-
platformIcon: "/img/news.svg"
|
|
176
|
+
platformIcon: "/img/news.svg",
|
|
177
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
169
178
|
},
|
|
170
179
|
{
|
|
171
180
|
total: 2,
|
|
@@ -174,7 +183,8 @@ var series = [
|
|
|
174
183
|
yDataName: "jp",
|
|
175
184
|
name: "日语",
|
|
176
185
|
value: 2,
|
|
177
|
-
platformIcon: "/img/news.svg"
|
|
186
|
+
platformIcon: "/img/news.svg",
|
|
187
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
178
188
|
},
|
|
179
189
|
{
|
|
180
190
|
total: 22,
|
|
@@ -183,7 +193,8 @@ var series = [
|
|
|
183
193
|
yDataName: "es",
|
|
184
194
|
name: "西班牙语",
|
|
185
195
|
value: 22,
|
|
186
|
-
platformIcon: "/img/news.svg"
|
|
196
|
+
platformIcon: "/img/news.svg",
|
|
197
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
187
198
|
},
|
|
188
199
|
{
|
|
189
200
|
total: null,
|
|
@@ -193,7 +204,8 @@ var series = [
|
|
|
193
204
|
name: "韩语",
|
|
194
205
|
minFlag: true,
|
|
195
206
|
value: null,
|
|
196
|
-
platformIcon: "/img/news.svg"
|
|
207
|
+
platformIcon: "/img/news.svg",
|
|
208
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
197
209
|
},
|
|
198
210
|
{
|
|
199
211
|
total: 12,
|
|
@@ -202,7 +214,8 @@ var series = [
|
|
|
202
214
|
yDataName: "fr",
|
|
203
215
|
name: "法语",
|
|
204
216
|
value: 12,
|
|
205
|
-
platformIcon: "/img/news.svg"
|
|
217
|
+
platformIcon: "/img/news.svg",
|
|
218
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
206
219
|
},
|
|
207
220
|
{
|
|
208
221
|
total: 8,
|
|
@@ -211,7 +224,8 @@ var series = [
|
|
|
211
224
|
yDataName: "vi",
|
|
212
225
|
name: "越南语",
|
|
213
226
|
value: 8,
|
|
214
|
-
platformIcon: "/img/news.svg"
|
|
227
|
+
platformIcon: "/img/news.svg",
|
|
228
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
215
229
|
}
|
|
216
230
|
]
|
|
217
231
|
},
|
|
@@ -243,7 +257,8 @@ var series = [
|
|
|
243
257
|
name: "英语",
|
|
244
258
|
minFlag: true,
|
|
245
259
|
value: null,
|
|
246
|
-
platformIcon: "/img/news.svg"
|
|
260
|
+
platformIcon: "/img/news.svg",
|
|
261
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
247
262
|
},
|
|
248
263
|
{
|
|
249
264
|
total: 230,
|
|
@@ -252,7 +267,8 @@ var series = [
|
|
|
252
267
|
yDataName: "zh",
|
|
253
268
|
name: "中文",
|
|
254
269
|
value: 230,
|
|
255
|
-
platformIcon: "/img/news.svg"
|
|
270
|
+
platformIcon: "/img/news.svg",
|
|
271
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
256
272
|
},
|
|
257
273
|
{
|
|
258
274
|
total: 13,
|
|
@@ -261,7 +277,8 @@ var series = [
|
|
|
261
277
|
yDataName: "jp",
|
|
262
278
|
name: "日语",
|
|
263
279
|
value: 13,
|
|
264
|
-
platformIcon: "/img/news.svg"
|
|
280
|
+
platformIcon: "/img/news.svg",
|
|
281
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
265
282
|
},
|
|
266
283
|
{
|
|
267
284
|
total: null,
|
|
@@ -271,7 +288,8 @@ var series = [
|
|
|
271
288
|
name: "西班牙语",
|
|
272
289
|
minFlag: true,
|
|
273
290
|
value: null,
|
|
274
|
-
platformIcon: "/img/news.svg"
|
|
291
|
+
platformIcon: "/img/news.svg",
|
|
292
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
275
293
|
},
|
|
276
294
|
{
|
|
277
295
|
total: null,
|
|
@@ -281,7 +299,8 @@ var series = [
|
|
|
281
299
|
name: "韩语",
|
|
282
300
|
minFlag: true,
|
|
283
301
|
value: null,
|
|
284
|
-
platformIcon: "/img/news.svg"
|
|
302
|
+
platformIcon: "/img/news.svg",
|
|
303
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
285
304
|
},
|
|
286
305
|
{
|
|
287
306
|
total: null,
|
|
@@ -291,7 +310,8 @@ var series = [
|
|
|
291
310
|
name: "法语",
|
|
292
311
|
minFlag: true,
|
|
293
312
|
value: null,
|
|
294
|
-
platformIcon: "/img/news.svg"
|
|
313
|
+
platformIcon: "/img/news.svg",
|
|
314
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
295
315
|
},
|
|
296
316
|
{
|
|
297
317
|
total: null,
|
|
@@ -301,7 +321,8 @@ var series = [
|
|
|
301
321
|
name: "越南语",
|
|
302
322
|
minFlag: true,
|
|
303
323
|
value: null,
|
|
304
|
-
platformIcon: "/img/news.svg"
|
|
324
|
+
platformIcon: "/img/news.svg",
|
|
325
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
305
326
|
}
|
|
306
327
|
]
|
|
307
328
|
},
|
|
@@ -332,7 +353,8 @@ var series = [
|
|
|
332
353
|
yDataName: "en",
|
|
333
354
|
name: "英语",
|
|
334
355
|
value: 144,
|
|
335
|
-
platformIcon: "/img/news.svg"
|
|
356
|
+
platformIcon: "/img/news.svg",
|
|
357
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
336
358
|
},
|
|
337
359
|
{
|
|
338
360
|
total: 3,
|
|
@@ -341,7 +363,8 @@ var series = [
|
|
|
341
363
|
yDataName: "zh",
|
|
342
364
|
name: "中文",
|
|
343
365
|
value: 3,
|
|
344
|
-
platformIcon: "/img/news.svg"
|
|
366
|
+
platformIcon: "/img/news.svg",
|
|
367
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
345
368
|
},
|
|
346
369
|
{
|
|
347
370
|
total: 2,
|
|
@@ -350,7 +373,8 @@ var series = [
|
|
|
350
373
|
yDataName: "jp",
|
|
351
374
|
name: "日语",
|
|
352
375
|
value: 2,
|
|
353
|
-
platformIcon: "/img/news.svg"
|
|
376
|
+
platformIcon: "/img/news.svg",
|
|
377
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
354
378
|
},
|
|
355
379
|
{
|
|
356
380
|
total: 7,
|
|
@@ -359,7 +383,8 @@ var series = [
|
|
|
359
383
|
yDataName: "es",
|
|
360
384
|
name: "西班牙语",
|
|
361
385
|
value: 7,
|
|
362
|
-
platformIcon: "/img/news.svg"
|
|
386
|
+
platformIcon: "/img/news.svg",
|
|
387
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
363
388
|
},
|
|
364
389
|
{
|
|
365
390
|
total: null,
|
|
@@ -369,7 +394,8 @@ var series = [
|
|
|
369
394
|
name: "韩语",
|
|
370
395
|
minFlag: true,
|
|
371
396
|
value: null,
|
|
372
|
-
platformIcon: "/img/news.svg"
|
|
397
|
+
platformIcon: "/img/news.svg",
|
|
398
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
373
399
|
},
|
|
374
400
|
{
|
|
375
401
|
total: 5,
|
|
@@ -378,7 +404,8 @@ var series = [
|
|
|
378
404
|
yDataName: "fr",
|
|
379
405
|
name: "法语",
|
|
380
406
|
value: 5,
|
|
381
|
-
platformIcon: "/img/news.svg"
|
|
407
|
+
platformIcon: "/img/news.svg",
|
|
408
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
382
409
|
},
|
|
383
410
|
{
|
|
384
411
|
total: null,
|
|
@@ -388,7 +415,8 @@ var series = [
|
|
|
388
415
|
name: "越南语",
|
|
389
416
|
minFlag: true,
|
|
390
417
|
value: null,
|
|
391
|
-
platformIcon: "/img/news.svg"
|
|
418
|
+
platformIcon: "/img/news.svg",
|
|
419
|
+
currentTime: "2025/12/13 - 2025/12/19 (近7天)"
|
|
392
420
|
}
|
|
393
421
|
]
|
|
394
422
|
}
|
|
@@ -414,6 +414,7 @@ function StackedBar(props) {
|
|
|
414
414
|
}
|
|
415
415
|
},
|
|
416
416
|
formatter: (res) => {
|
|
417
|
+
var _a2, _b2, _c2;
|
|
417
418
|
if (!res.some((i) => i.value !== void 0 && i.value !== null)) {
|
|
418
419
|
return "";
|
|
419
420
|
}
|
|
@@ -426,9 +427,9 @@ function StackedBar(props) {
|
|
|
426
427
|
const resNameArr = res.map((item) => item.seriesName);
|
|
427
428
|
const resColorArr = res.map((item) => item.color);
|
|
428
429
|
dataArr = series.filter((item) => resNameArr.includes(item.name)).map((item, index) => {
|
|
429
|
-
let
|
|
430
|
-
let num = item.data[
|
|
431
|
-
let minFlag = item.data[
|
|
430
|
+
let dataIndex2 = res[0].dataIndex;
|
|
431
|
+
let num = item.data[dataIndex2].value;
|
|
432
|
+
let minFlag = item.data[dataIndex2].minFlag;
|
|
432
433
|
if (minFlag && num === null) {
|
|
433
434
|
num = 0;
|
|
434
435
|
}
|
|
@@ -453,8 +454,11 @@ function StackedBar(props) {
|
|
|
453
454
|
if (element2 && element2.offsetWidth) {
|
|
454
455
|
triangleWidth = element2.offsetWidth;
|
|
455
456
|
}
|
|
457
|
+
const dataIndex = res[0].dataIndex;
|
|
458
|
+
const currentTime = ((_c2 = (_b2 = (_a2 = series[0]) == null ? void 0 : _a2.data) == null ? void 0 : _b2[dataIndex]) == null ? void 0 : _c2.currentTime) || null;
|
|
456
459
|
return `<div style="width:278px;position: relative;">
|
|
457
460
|
<div class='tooltip-head'>${res[0].name}</div>
|
|
461
|
+
${currentTime ? `<div class="tooltip-time">${currentTime}</div>` : ""}
|
|
458
462
|
<div class='tooltip-body'>
|
|
459
463
|
${isTotalShow ? `<div class='total'>
|
|
460
464
|
<div class='l'>
|
|
@@ -8,13 +8,26 @@
|
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
text-overflow: ellipsis;
|
|
11
|
-
border-bottom: 1px solid #eeeeee;
|
|
12
11
|
padding: 10px 16px 10px;
|
|
13
12
|
font-weight: bold;
|
|
14
13
|
font-size: 15px;
|
|
15
14
|
color: #364141;
|
|
16
15
|
line-height: 22px;
|
|
17
16
|
}
|
|
17
|
+
.tooltip-head {
|
|
18
|
+
padding-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
.tooltip-time {
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
border-bottom: 1px solid #eeeeee;
|
|
24
|
+
padding: 4px 16px;
|
|
25
|
+
color: #364141;
|
|
26
|
+
line-height: 22px;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
}
|
|
18
31
|
.tooltip-body {
|
|
19
32
|
margin-right: 3px;
|
|
20
33
|
padding: 0 0 0 8px;
|