@hecom/codearts 0.4.2 → 0.4.3
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/charts/macarons.d.ts +354 -0
- package/dist/charts/macarons.js +398 -0
- package/dist/charts/modules/bug-by-assignee.js +3 -4
- package/dist/charts/modules/bug-by-defect-analysis.js +1 -2
- package/dist/charts/modules/bug-by-developer-hours.js +2 -4
- package/dist/charts/modules/bug-by-fix-duration.js +4 -4
- package/dist/charts/modules/bug-by-module.js +5 -5
- package/dist/charts/modules/bug-open-priority-heatmap.js +1 -5
- package/dist/charts/renderer.js +36 -12
- package/package.json +4 -4
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
declare const macarons: {
|
|
2
|
+
color: string[];
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
textStyle: {};
|
|
5
|
+
title: {
|
|
6
|
+
textStyle: {
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
subtextStyle: {
|
|
10
|
+
color: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
line: {
|
|
14
|
+
itemStyle: {
|
|
15
|
+
borderWidth: number;
|
|
16
|
+
};
|
|
17
|
+
lineStyle: {
|
|
18
|
+
width: number;
|
|
19
|
+
};
|
|
20
|
+
symbolSize: number;
|
|
21
|
+
symbol: string;
|
|
22
|
+
smooth: boolean;
|
|
23
|
+
};
|
|
24
|
+
radar: {
|
|
25
|
+
itemStyle: {
|
|
26
|
+
borderWidth: number;
|
|
27
|
+
};
|
|
28
|
+
lineStyle: {
|
|
29
|
+
width: number;
|
|
30
|
+
};
|
|
31
|
+
symbolSize: number;
|
|
32
|
+
symbol: string;
|
|
33
|
+
smooth: boolean;
|
|
34
|
+
};
|
|
35
|
+
bar: {
|
|
36
|
+
itemStyle: {
|
|
37
|
+
barBorderWidth: number;
|
|
38
|
+
barBorderColor: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
pie: {
|
|
42
|
+
itemStyle: {
|
|
43
|
+
borderWidth: number;
|
|
44
|
+
borderColor: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
scatter: {
|
|
48
|
+
itemStyle: {
|
|
49
|
+
borderWidth: number;
|
|
50
|
+
borderColor: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
boxplot: {
|
|
54
|
+
itemStyle: {
|
|
55
|
+
borderWidth: number;
|
|
56
|
+
borderColor: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
parallel: {
|
|
60
|
+
itemStyle: {
|
|
61
|
+
borderWidth: number;
|
|
62
|
+
borderColor: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
sankey: {
|
|
66
|
+
itemStyle: {
|
|
67
|
+
borderWidth: number;
|
|
68
|
+
borderColor: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
funnel: {
|
|
72
|
+
itemStyle: {
|
|
73
|
+
borderWidth: number;
|
|
74
|
+
borderColor: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
gauge: {
|
|
78
|
+
itemStyle: {
|
|
79
|
+
borderWidth: number;
|
|
80
|
+
borderColor: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
candlestick: {
|
|
84
|
+
itemStyle: {
|
|
85
|
+
color: string;
|
|
86
|
+
color0: string;
|
|
87
|
+
borderColor: string;
|
|
88
|
+
borderColor0: string;
|
|
89
|
+
borderWidth: number;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
graph: {
|
|
93
|
+
itemStyle: {
|
|
94
|
+
borderWidth: number;
|
|
95
|
+
borderColor: string;
|
|
96
|
+
};
|
|
97
|
+
lineStyle: {
|
|
98
|
+
width: number;
|
|
99
|
+
color: string;
|
|
100
|
+
};
|
|
101
|
+
symbolSize: number;
|
|
102
|
+
symbol: string;
|
|
103
|
+
smooth: boolean;
|
|
104
|
+
color: string[];
|
|
105
|
+
label: {
|
|
106
|
+
color: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
map: {
|
|
110
|
+
itemStyle: {
|
|
111
|
+
areaColor: string;
|
|
112
|
+
borderColor: string;
|
|
113
|
+
borderWidth: number;
|
|
114
|
+
};
|
|
115
|
+
label: {
|
|
116
|
+
color: string;
|
|
117
|
+
};
|
|
118
|
+
emphasis: {
|
|
119
|
+
itemStyle: {
|
|
120
|
+
areaColor: string;
|
|
121
|
+
borderColor: string;
|
|
122
|
+
borderWidth: number;
|
|
123
|
+
};
|
|
124
|
+
label: {
|
|
125
|
+
color: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
geo: {
|
|
130
|
+
itemStyle: {
|
|
131
|
+
areaColor: string;
|
|
132
|
+
borderColor: string;
|
|
133
|
+
borderWidth: number;
|
|
134
|
+
};
|
|
135
|
+
label: {
|
|
136
|
+
color: string;
|
|
137
|
+
};
|
|
138
|
+
emphasis: {
|
|
139
|
+
itemStyle: {
|
|
140
|
+
areaColor: string;
|
|
141
|
+
borderColor: string;
|
|
142
|
+
borderWidth: number;
|
|
143
|
+
};
|
|
144
|
+
label: {
|
|
145
|
+
color: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
categoryAxis: {
|
|
150
|
+
axisLine: {
|
|
151
|
+
show: boolean;
|
|
152
|
+
lineStyle: {
|
|
153
|
+
color: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
axisTick: {
|
|
157
|
+
show: boolean;
|
|
158
|
+
lineStyle: {
|
|
159
|
+
color: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
axisLabel: {
|
|
163
|
+
show: boolean;
|
|
164
|
+
color: string;
|
|
165
|
+
};
|
|
166
|
+
splitLine: {
|
|
167
|
+
show: boolean;
|
|
168
|
+
lineStyle: {
|
|
169
|
+
color: string[];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
splitArea: {
|
|
173
|
+
show: boolean;
|
|
174
|
+
areaStyle: {
|
|
175
|
+
color: string[];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
valueAxis: {
|
|
180
|
+
axisLine: {
|
|
181
|
+
show: boolean;
|
|
182
|
+
lineStyle: {
|
|
183
|
+
color: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
axisTick: {
|
|
187
|
+
show: boolean;
|
|
188
|
+
lineStyle: {
|
|
189
|
+
color: string;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
axisLabel: {
|
|
193
|
+
show: boolean;
|
|
194
|
+
color: string;
|
|
195
|
+
};
|
|
196
|
+
splitLine: {
|
|
197
|
+
show: boolean;
|
|
198
|
+
lineStyle: {
|
|
199
|
+
color: string[];
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
splitArea: {
|
|
203
|
+
show: boolean;
|
|
204
|
+
areaStyle: {
|
|
205
|
+
color: string[];
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
logAxis: {
|
|
210
|
+
axisLine: {
|
|
211
|
+
show: boolean;
|
|
212
|
+
lineStyle: {
|
|
213
|
+
color: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
axisTick: {
|
|
217
|
+
show: boolean;
|
|
218
|
+
lineStyle: {
|
|
219
|
+
color: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
axisLabel: {
|
|
223
|
+
show: boolean;
|
|
224
|
+
color: string;
|
|
225
|
+
};
|
|
226
|
+
splitLine: {
|
|
227
|
+
show: boolean;
|
|
228
|
+
lineStyle: {
|
|
229
|
+
color: string[];
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
splitArea: {
|
|
233
|
+
show: boolean;
|
|
234
|
+
areaStyle: {
|
|
235
|
+
color: string[];
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
timeAxis: {
|
|
240
|
+
axisLine: {
|
|
241
|
+
show: boolean;
|
|
242
|
+
lineStyle: {
|
|
243
|
+
color: string;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
axisTick: {
|
|
247
|
+
show: boolean;
|
|
248
|
+
lineStyle: {
|
|
249
|
+
color: string;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
axisLabel: {
|
|
253
|
+
show: boolean;
|
|
254
|
+
color: string;
|
|
255
|
+
};
|
|
256
|
+
splitLine: {
|
|
257
|
+
show: boolean;
|
|
258
|
+
lineStyle: {
|
|
259
|
+
color: string[];
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
splitArea: {
|
|
263
|
+
show: boolean;
|
|
264
|
+
areaStyle: {
|
|
265
|
+
color: string[];
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
toolbox: {
|
|
270
|
+
iconStyle: {
|
|
271
|
+
borderColor: string;
|
|
272
|
+
};
|
|
273
|
+
emphasis: {
|
|
274
|
+
iconStyle: {
|
|
275
|
+
borderColor: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
legend: {
|
|
280
|
+
textStyle: {
|
|
281
|
+
color: string;
|
|
282
|
+
};
|
|
283
|
+
left: string;
|
|
284
|
+
right: string;
|
|
285
|
+
top: number;
|
|
286
|
+
bottom: number;
|
|
287
|
+
};
|
|
288
|
+
tooltip: {
|
|
289
|
+
axisPointer: {
|
|
290
|
+
lineStyle: {
|
|
291
|
+
color: string;
|
|
292
|
+
width: string;
|
|
293
|
+
};
|
|
294
|
+
crossStyle: {
|
|
295
|
+
color: string;
|
|
296
|
+
width: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
timeline: {
|
|
301
|
+
lineStyle: {
|
|
302
|
+
color: string;
|
|
303
|
+
width: number;
|
|
304
|
+
};
|
|
305
|
+
itemStyle: {
|
|
306
|
+
color: string;
|
|
307
|
+
borderWidth: number;
|
|
308
|
+
};
|
|
309
|
+
controlStyle: {
|
|
310
|
+
color: string;
|
|
311
|
+
borderColor: string;
|
|
312
|
+
borderWidth: number;
|
|
313
|
+
};
|
|
314
|
+
checkpointStyle: {
|
|
315
|
+
color: string;
|
|
316
|
+
borderColor: string;
|
|
317
|
+
};
|
|
318
|
+
label: {
|
|
319
|
+
color: string;
|
|
320
|
+
};
|
|
321
|
+
emphasis: {
|
|
322
|
+
itemStyle: {
|
|
323
|
+
color: string;
|
|
324
|
+
};
|
|
325
|
+
controlStyle: {
|
|
326
|
+
color: string;
|
|
327
|
+
borderColor: string;
|
|
328
|
+
borderWidth: number;
|
|
329
|
+
};
|
|
330
|
+
label: {
|
|
331
|
+
color: string;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
visualMap: {
|
|
336
|
+
color: string[];
|
|
337
|
+
};
|
|
338
|
+
markPoint: {
|
|
339
|
+
label: {
|
|
340
|
+
color: string;
|
|
341
|
+
};
|
|
342
|
+
emphasis: {
|
|
343
|
+
label: {
|
|
344
|
+
color: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
grid: {
|
|
349
|
+
left: string;
|
|
350
|
+
right: string;
|
|
351
|
+
bottom: number;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
export default macarons;
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const macarons = {
|
|
4
|
+
color: [
|
|
5
|
+
'#2ec7c9',
|
|
6
|
+
'#b6a2de',
|
|
7
|
+
'#5ab1ef',
|
|
8
|
+
'#ffb980',
|
|
9
|
+
'#d87a80',
|
|
10
|
+
'#8d98b3',
|
|
11
|
+
'#e5cf0d',
|
|
12
|
+
'#97b552',
|
|
13
|
+
'#95706d',
|
|
14
|
+
'#dc69aa',
|
|
15
|
+
'#07a2a4',
|
|
16
|
+
'#9a7fd1',
|
|
17
|
+
'#588dd5',
|
|
18
|
+
'#f5994e',
|
|
19
|
+
'#c05050',
|
|
20
|
+
'#59678c',
|
|
21
|
+
'#c9ab00',
|
|
22
|
+
'#7eb00a',
|
|
23
|
+
'#6f5553',
|
|
24
|
+
'#c14089',
|
|
25
|
+
],
|
|
26
|
+
backgroundColor: 'rgba(0,0,0,0)',
|
|
27
|
+
textStyle: {},
|
|
28
|
+
title: {
|
|
29
|
+
textStyle: {
|
|
30
|
+
color: '#008acd',
|
|
31
|
+
},
|
|
32
|
+
subtextStyle: {
|
|
33
|
+
color: '#aaa',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
line: {
|
|
37
|
+
itemStyle: {
|
|
38
|
+
borderWidth: 1,
|
|
39
|
+
},
|
|
40
|
+
lineStyle: {
|
|
41
|
+
width: 2,
|
|
42
|
+
},
|
|
43
|
+
symbolSize: 3,
|
|
44
|
+
symbol: 'emptyCircle',
|
|
45
|
+
smooth: true,
|
|
46
|
+
},
|
|
47
|
+
radar: {
|
|
48
|
+
itemStyle: {
|
|
49
|
+
borderWidth: 1,
|
|
50
|
+
},
|
|
51
|
+
lineStyle: {
|
|
52
|
+
width: 2,
|
|
53
|
+
},
|
|
54
|
+
symbolSize: 3,
|
|
55
|
+
symbol: 'emptyCircle',
|
|
56
|
+
smooth: true,
|
|
57
|
+
},
|
|
58
|
+
bar: {
|
|
59
|
+
itemStyle: {
|
|
60
|
+
barBorderWidth: 0,
|
|
61
|
+
barBorderColor: '#ccc',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
pie: {
|
|
65
|
+
itemStyle: {
|
|
66
|
+
borderWidth: 0,
|
|
67
|
+
borderColor: '#ccc',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
scatter: {
|
|
71
|
+
itemStyle: {
|
|
72
|
+
borderWidth: 0,
|
|
73
|
+
borderColor: '#ccc',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
boxplot: {
|
|
77
|
+
itemStyle: {
|
|
78
|
+
borderWidth: 0,
|
|
79
|
+
borderColor: '#ccc',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
parallel: {
|
|
83
|
+
itemStyle: {
|
|
84
|
+
borderWidth: 0,
|
|
85
|
+
borderColor: '#ccc',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
sankey: {
|
|
89
|
+
itemStyle: {
|
|
90
|
+
borderWidth: 0,
|
|
91
|
+
borderColor: '#ccc',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
funnel: {
|
|
95
|
+
itemStyle: {
|
|
96
|
+
borderWidth: 0,
|
|
97
|
+
borderColor: '#ccc',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
gauge: {
|
|
101
|
+
itemStyle: {
|
|
102
|
+
borderWidth: 0,
|
|
103
|
+
borderColor: '#ccc',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
candlestick: {
|
|
107
|
+
itemStyle: {
|
|
108
|
+
color: '#d87a80',
|
|
109
|
+
color0: '#2ec7c9',
|
|
110
|
+
borderColor: '#d87a80',
|
|
111
|
+
borderColor0: '#2ec7c9',
|
|
112
|
+
borderWidth: 1,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
graph: {
|
|
116
|
+
itemStyle: {
|
|
117
|
+
borderWidth: 0,
|
|
118
|
+
borderColor: '#ccc',
|
|
119
|
+
},
|
|
120
|
+
lineStyle: {
|
|
121
|
+
width: 1,
|
|
122
|
+
color: '#aaa',
|
|
123
|
+
},
|
|
124
|
+
symbolSize: 3,
|
|
125
|
+
symbol: 'emptyCircle',
|
|
126
|
+
smooth: true,
|
|
127
|
+
color: [
|
|
128
|
+
'#2ec7c9',
|
|
129
|
+
'#b6a2de',
|
|
130
|
+
'#5ab1ef',
|
|
131
|
+
'#ffb980',
|
|
132
|
+
'#d87a80',
|
|
133
|
+
'#8d98b3',
|
|
134
|
+
'#e5cf0d',
|
|
135
|
+
'#97b552',
|
|
136
|
+
'#95706d',
|
|
137
|
+
'#dc69aa',
|
|
138
|
+
'#07a2a4',
|
|
139
|
+
'#9a7fd1',
|
|
140
|
+
'#588dd5',
|
|
141
|
+
'#f5994e',
|
|
142
|
+
'#c05050',
|
|
143
|
+
'#59678c',
|
|
144
|
+
'#c9ab00',
|
|
145
|
+
'#7eb00a',
|
|
146
|
+
'#6f5553',
|
|
147
|
+
'#c14089',
|
|
148
|
+
],
|
|
149
|
+
label: {
|
|
150
|
+
color: '#eee',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
map: {
|
|
154
|
+
itemStyle: {
|
|
155
|
+
areaColor: '#dddddd',
|
|
156
|
+
borderColor: '#eeeeee',
|
|
157
|
+
borderWidth: 0.5,
|
|
158
|
+
},
|
|
159
|
+
label: {
|
|
160
|
+
color: '#d87a80',
|
|
161
|
+
},
|
|
162
|
+
emphasis: {
|
|
163
|
+
itemStyle: {
|
|
164
|
+
areaColor: 'rgba(254,153,78,1)',
|
|
165
|
+
borderColor: '#444',
|
|
166
|
+
borderWidth: 1,
|
|
167
|
+
},
|
|
168
|
+
label: {
|
|
169
|
+
color: 'rgb(100,0,0)',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
geo: {
|
|
174
|
+
itemStyle: {
|
|
175
|
+
areaColor: '#dddddd',
|
|
176
|
+
borderColor: '#eeeeee',
|
|
177
|
+
borderWidth: 0.5,
|
|
178
|
+
},
|
|
179
|
+
label: {
|
|
180
|
+
color: '#d87a80',
|
|
181
|
+
},
|
|
182
|
+
emphasis: {
|
|
183
|
+
itemStyle: {
|
|
184
|
+
areaColor: 'rgba(254,153,78,1)',
|
|
185
|
+
borderColor: '#444',
|
|
186
|
+
borderWidth: 1,
|
|
187
|
+
},
|
|
188
|
+
label: {
|
|
189
|
+
color: 'rgb(100,0,0)',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
categoryAxis: {
|
|
194
|
+
axisLine: {
|
|
195
|
+
show: true,
|
|
196
|
+
lineStyle: {
|
|
197
|
+
color: '#008acd',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
axisTick: {
|
|
201
|
+
show: true,
|
|
202
|
+
lineStyle: {
|
|
203
|
+
color: '#333',
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
axisLabel: {
|
|
207
|
+
show: true,
|
|
208
|
+
color: '#333',
|
|
209
|
+
},
|
|
210
|
+
splitLine: {
|
|
211
|
+
show: false,
|
|
212
|
+
lineStyle: {
|
|
213
|
+
color: ['#eee'],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
splitArea: {
|
|
217
|
+
show: false,
|
|
218
|
+
areaStyle: {
|
|
219
|
+
color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)'],
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
valueAxis: {
|
|
224
|
+
axisLine: {
|
|
225
|
+
show: true,
|
|
226
|
+
lineStyle: {
|
|
227
|
+
color: '#008acd',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
axisTick: {
|
|
231
|
+
show: true,
|
|
232
|
+
lineStyle: {
|
|
233
|
+
color: '#333',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
axisLabel: {
|
|
237
|
+
show: true,
|
|
238
|
+
color: '#333',
|
|
239
|
+
},
|
|
240
|
+
splitLine: {
|
|
241
|
+
show: true,
|
|
242
|
+
lineStyle: {
|
|
243
|
+
color: ['#eee'],
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
splitArea: {
|
|
247
|
+
show: true,
|
|
248
|
+
areaStyle: {
|
|
249
|
+
color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)'],
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
logAxis: {
|
|
254
|
+
axisLine: {
|
|
255
|
+
show: true,
|
|
256
|
+
lineStyle: {
|
|
257
|
+
color: '#008acd',
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
axisTick: {
|
|
261
|
+
show: true,
|
|
262
|
+
lineStyle: {
|
|
263
|
+
color: '#333',
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
axisLabel: {
|
|
267
|
+
show: true,
|
|
268
|
+
color: '#333',
|
|
269
|
+
},
|
|
270
|
+
splitLine: {
|
|
271
|
+
show: true,
|
|
272
|
+
lineStyle: {
|
|
273
|
+
color: ['#eee'],
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
splitArea: {
|
|
277
|
+
show: true,
|
|
278
|
+
areaStyle: {
|
|
279
|
+
color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)'],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
timeAxis: {
|
|
284
|
+
axisLine: {
|
|
285
|
+
show: true,
|
|
286
|
+
lineStyle: {
|
|
287
|
+
color: '#008acd',
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
axisTick: {
|
|
291
|
+
show: true,
|
|
292
|
+
lineStyle: {
|
|
293
|
+
color: '#333',
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
axisLabel: {
|
|
297
|
+
show: true,
|
|
298
|
+
color: '#333',
|
|
299
|
+
},
|
|
300
|
+
splitLine: {
|
|
301
|
+
show: true,
|
|
302
|
+
lineStyle: {
|
|
303
|
+
color: ['#eee'],
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
splitArea: {
|
|
307
|
+
show: false,
|
|
308
|
+
areaStyle: {
|
|
309
|
+
color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)'],
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
toolbox: {
|
|
314
|
+
iconStyle: {
|
|
315
|
+
borderColor: '#2ec7c9',
|
|
316
|
+
},
|
|
317
|
+
emphasis: {
|
|
318
|
+
iconStyle: {
|
|
319
|
+
borderColor: '#18a4a6',
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
legend: {
|
|
324
|
+
textStyle: {
|
|
325
|
+
color: '#333333',
|
|
326
|
+
},
|
|
327
|
+
left: 'center',
|
|
328
|
+
right: 'auto',
|
|
329
|
+
top: 0,
|
|
330
|
+
bottom: 10,
|
|
331
|
+
},
|
|
332
|
+
tooltip: {
|
|
333
|
+
axisPointer: {
|
|
334
|
+
lineStyle: {
|
|
335
|
+
color: '#008acd',
|
|
336
|
+
width: '1',
|
|
337
|
+
},
|
|
338
|
+
crossStyle: {
|
|
339
|
+
color: '#008acd',
|
|
340
|
+
width: '1',
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
timeline: {
|
|
345
|
+
lineStyle: {
|
|
346
|
+
color: '#008acd',
|
|
347
|
+
width: 1,
|
|
348
|
+
},
|
|
349
|
+
itemStyle: {
|
|
350
|
+
color: '#008acd',
|
|
351
|
+
borderWidth: 1,
|
|
352
|
+
},
|
|
353
|
+
controlStyle: {
|
|
354
|
+
color: '#008acd',
|
|
355
|
+
borderColor: '#008acd',
|
|
356
|
+
borderWidth: 0.5,
|
|
357
|
+
},
|
|
358
|
+
checkpointStyle: {
|
|
359
|
+
color: '#2ec7c9',
|
|
360
|
+
borderColor: 'rgba(46,199,201,0.4)',
|
|
361
|
+
},
|
|
362
|
+
label: {
|
|
363
|
+
color: '#008acd',
|
|
364
|
+
},
|
|
365
|
+
emphasis: {
|
|
366
|
+
itemStyle: {
|
|
367
|
+
color: '#a9334c',
|
|
368
|
+
},
|
|
369
|
+
controlStyle: {
|
|
370
|
+
color: '#008acd',
|
|
371
|
+
borderColor: '#008acd',
|
|
372
|
+
borderWidth: 0.5,
|
|
373
|
+
},
|
|
374
|
+
label: {
|
|
375
|
+
color: '#008acd',
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
visualMap: {
|
|
380
|
+
color: ['#5ab1ef', '#e0ffff'],
|
|
381
|
+
},
|
|
382
|
+
markPoint: {
|
|
383
|
+
label: {
|
|
384
|
+
color: '#eee',
|
|
385
|
+
},
|
|
386
|
+
emphasis: {
|
|
387
|
+
label: {
|
|
388
|
+
color: '#eee',
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
grid: {
|
|
393
|
+
left: '3%',
|
|
394
|
+
right: '6%',
|
|
395
|
+
bottom: 70,
|
|
396
|
+
},
|
|
397
|
+
};
|
|
398
|
+
exports.default = macarons;
|
|
@@ -14,11 +14,10 @@ exports.bugByAssigneeChart = {
|
|
|
14
14
|
const values = sorted.map(([, value]) => value);
|
|
15
15
|
return {
|
|
16
16
|
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
|
|
17
|
-
grid: { left: '3%', right: '6%', bottom: '3%', containLabel: true },
|
|
17
|
+
// grid: { left: '3%', right: '6%', bottom: '3%', containLabel: true },
|
|
18
18
|
xAxis: {
|
|
19
19
|
type: 'value',
|
|
20
20
|
axisLine: { show: false },
|
|
21
|
-
splitLine: { lineStyle: { color: '#f0f3f7' } },
|
|
22
21
|
},
|
|
23
22
|
yAxis: {
|
|
24
23
|
type: 'category',
|
|
@@ -31,8 +30,8 @@ exports.bugByAssigneeChart = {
|
|
|
31
30
|
{
|
|
32
31
|
type: 'bar',
|
|
33
32
|
data: values,
|
|
34
|
-
label: { show: true, position: 'right',
|
|
35
|
-
itemStyle: {
|
|
33
|
+
label: { show: true, position: 'right', fontWeight: 600 },
|
|
34
|
+
itemStyle: { borderRadius: 6 },
|
|
36
35
|
barCategoryGap: '40%',
|
|
37
36
|
},
|
|
38
37
|
],
|
|
@@ -15,7 +15,7 @@ exports.bugByDefectAnalysisChart = {
|
|
|
15
15
|
.map(([name, value]) => ({ name, value }));
|
|
16
16
|
return {
|
|
17
17
|
tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' },
|
|
18
|
-
legend: { orient: 'vertical', left: 'left', type: 'scroll'
|
|
18
|
+
legend: { orient: 'vertical', left: 'left', type: 'scroll' },
|
|
19
19
|
series: [
|
|
20
20
|
{
|
|
21
21
|
type: 'pie',
|
|
@@ -25,7 +25,6 @@ exports.bugByDefectAnalysisChart = {
|
|
|
25
25
|
show: true,
|
|
26
26
|
position: 'outside',
|
|
27
27
|
formatter: '{b}: {d}%',
|
|
28
|
-
color: '#111827',
|
|
29
28
|
},
|
|
30
29
|
labelLine: { length: 18, length2: 6, lineStyle: { width: 1 } },
|
|
31
30
|
data,
|
|
@@ -16,12 +16,11 @@ exports.bugByDeveloperHoursChart = {
|
|
|
16
16
|
const values = sorted.map(([, hours]) => hours);
|
|
17
17
|
return {
|
|
18
18
|
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
|
|
19
|
-
grid: { left: '3%', right: '6%', bottom: '3%', containLabel: true },
|
|
19
|
+
// grid: { left: '3%', right: '6%', bottom: '3%', containLabel: true },
|
|
20
20
|
xAxis: {
|
|
21
21
|
type: 'value',
|
|
22
22
|
name: '小时',
|
|
23
23
|
axisLine: { show: false },
|
|
24
|
-
splitLine: { lineStyle: { color: '#f0f3f7' } },
|
|
25
24
|
},
|
|
26
25
|
yAxis: {
|
|
27
26
|
type: 'category',
|
|
@@ -38,10 +37,9 @@ exports.bugByDeveloperHoursChart = {
|
|
|
38
37
|
show: true,
|
|
39
38
|
position: 'right',
|
|
40
39
|
formatter: '{c}h',
|
|
41
|
-
color: '#111827',
|
|
42
40
|
fontWeight: 600,
|
|
43
41
|
},
|
|
44
|
-
itemStyle: {
|
|
42
|
+
itemStyle: { borderRadius: 6 },
|
|
45
43
|
barCategoryGap: '40%',
|
|
46
44
|
},
|
|
47
45
|
],
|
|
@@ -27,20 +27,20 @@ exports.bugByFixDurationChart = {
|
|
|
27
27
|
const values = BUCKETS.map((b) => countMap.get(b) ?? 0);
|
|
28
28
|
return {
|
|
29
29
|
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
|
|
30
|
-
grid: { left: '6%', right: '6%', bottom: '8%', containLabel: true },
|
|
30
|
+
// grid: { left: '6%', right: '6%', bottom: '8%', containLabel: true },
|
|
31
31
|
xAxis: {
|
|
32
32
|
type: 'category',
|
|
33
33
|
data: [...BUCKETS],
|
|
34
34
|
axisLine: { show: false },
|
|
35
35
|
axisTick: { show: false },
|
|
36
36
|
},
|
|
37
|
-
yAxis: { type: 'value', minInterval: 1
|
|
37
|
+
yAxis: { type: 'value', minInterval: 1 },
|
|
38
38
|
series: [
|
|
39
39
|
{
|
|
40
40
|
type: 'bar',
|
|
41
41
|
data: values,
|
|
42
|
-
label: { show: true, position: 'top'
|
|
43
|
-
itemStyle: {
|
|
42
|
+
label: { show: true, position: 'top' },
|
|
43
|
+
itemStyle: { borderRadius: [6, 6, 0, 0] },
|
|
44
44
|
barWidth: '46%',
|
|
45
45
|
},
|
|
46
46
|
],
|
|
@@ -14,20 +14,20 @@ exports.bugByModuleChart = {
|
|
|
14
14
|
const values = sorted.map(([, value]) => value);
|
|
15
15
|
return {
|
|
16
16
|
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
|
|
17
|
-
grid: { left: '4%', right: '4%', bottom: '18%', containLabel: true },
|
|
17
|
+
// grid: { left: '4%', right: '4%', bottom: '18%', containLabel: true },
|
|
18
18
|
xAxis: {
|
|
19
19
|
type: 'category',
|
|
20
20
|
data: names,
|
|
21
|
-
axisLabel: { rotate: 30, overflow: 'truncate', width: 90
|
|
21
|
+
axisLabel: { rotate: 30, overflow: 'truncate', width: 90 },
|
|
22
22
|
axisLine: { show: false },
|
|
23
23
|
},
|
|
24
|
-
yAxis: { type: 'value', splitLine: { lineStyle: {
|
|
24
|
+
yAxis: { type: 'value', splitLine: { lineStyle: {} } },
|
|
25
25
|
series: [
|
|
26
26
|
{
|
|
27
27
|
type: 'bar',
|
|
28
28
|
data: values,
|
|
29
|
-
label: { show: true, position: 'top'
|
|
30
|
-
itemStyle: {
|
|
29
|
+
label: { show: true, position: 'top' },
|
|
30
|
+
itemStyle: { borderRadius: 6 },
|
|
31
31
|
barWidth: '48%',
|
|
32
32
|
},
|
|
33
33
|
],
|
|
@@ -38,18 +38,16 @@ exports.bugOpenPriorityHeatmapChart = {
|
|
|
38
38
|
position: 'top',
|
|
39
39
|
formatter: (params) => `${yCategories[params.data[1]]} / ${xCategories[params.data[0]]}: ${params.data[2]} 个`,
|
|
40
40
|
},
|
|
41
|
-
grid: { left: '4%', right: '4%', bottom: '12%', containLabel: true },
|
|
41
|
+
// grid: { left: '4%', right: '4%', bottom: '12%', containLabel: true },
|
|
42
42
|
xAxis: {
|
|
43
43
|
type: 'category',
|
|
44
44
|
data: xCategories,
|
|
45
45
|
splitArea: { show: true },
|
|
46
|
-
axisLabel: { color: '#666' },
|
|
47
46
|
},
|
|
48
47
|
yAxis: {
|
|
49
48
|
type: 'category',
|
|
50
49
|
data: yCategories,
|
|
51
50
|
splitArea: { show: true },
|
|
52
|
-
axisLabel: { color: '#666' },
|
|
53
51
|
},
|
|
54
52
|
visualMap: {
|
|
55
53
|
min: 0,
|
|
@@ -58,7 +56,6 @@ exports.bugOpenPriorityHeatmapChart = {
|
|
|
58
56
|
orient: 'horizontal',
|
|
59
57
|
left: 'center',
|
|
60
58
|
bottom: '0%',
|
|
61
|
-
inRange: { color: ['#ffffff', '#FF9A76'] },
|
|
62
59
|
},
|
|
63
60
|
series: [
|
|
64
61
|
{
|
|
@@ -67,7 +64,6 @@ exports.bugOpenPriorityHeatmapChart = {
|
|
|
67
64
|
label: {
|
|
68
65
|
show: true,
|
|
69
66
|
formatter: (params) => params.data[2] > 0 ? String(params.data[2]) : '',
|
|
70
|
-
color: '#111827',
|
|
71
67
|
},
|
|
72
68
|
emphasis: { itemStyle: { shadowBlur: 10, shadowColor: 'rgba(0, 0, 0, 0.5)' } },
|
|
73
69
|
},
|
package/dist/charts/renderer.js
CHANGED
|
@@ -32,6 +32,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
39
|
exports.renderReport = renderReport;
|
|
37
40
|
exports.openInBrowser = openInBrowser;
|
|
@@ -39,6 +42,7 @@ const child_process_1 = require("child_process");
|
|
|
39
42
|
const fs = __importStar(require("fs"));
|
|
40
43
|
const path = __importStar(require("path"));
|
|
41
44
|
const logger_1 = require("../utils/logger");
|
|
45
|
+
const macarons_1 = __importDefault(require("./macarons"));
|
|
42
46
|
/**
|
|
43
47
|
* 生成 HTML 报告并写入文件,返回文件路径。
|
|
44
48
|
* @param bugs Bug 列表
|
|
@@ -87,6 +91,8 @@ function renderReport(bugs, charts, meta, outputDir) {
|
|
|
87
91
|
return outputPath;
|
|
88
92
|
}
|
|
89
93
|
function buildHtml(bugs, charts, meta) {
|
|
94
|
+
// 使用打包友好的方式:直接从 macarons.ts 导出对象(避免构建后 JSON 丢失)
|
|
95
|
+
const macaronsForHtml = JSON.stringify(macarons_1.default || {});
|
|
90
96
|
const chartContainers = charts
|
|
91
97
|
.map((chart, i) => `<div class="chart-card">
|
|
92
98
|
<div class="chart-title">${chart.title}</div>
|
|
@@ -99,18 +105,25 @@ function buildHtml(bugs, charts, meta) {
|
|
|
99
105
|
return `(() => {
|
|
100
106
|
const el = document.getElementById('chart-${i}');
|
|
101
107
|
if (!el) return;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
let myChart;
|
|
109
|
+
try {
|
|
110
|
+
// 优先使用已注册的 macarons 主题进行初始化
|
|
111
|
+
myChart = echarts.init(el, 'macarons');
|
|
112
|
+
myChart.setOption(${option}, true);
|
|
113
|
+
} catch (e) {
|
|
114
|
+
// 回退:若主题不可用或初始化失败,使用原先的默认样式并继续渲染
|
|
115
|
+
const defaultTheme = {
|
|
116
|
+
color: ['#4A6CF7', '#6AD3FF', '#6BCB9B', '#FFD66B', '#FF9A76', '#7E63FF', '#FFA2EC'],
|
|
117
|
+
textStyle: { color: '#2b2b2b', fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif' },
|
|
118
|
+
tooltip: { backgroundColor: 'rgba(0,0,0,0.75)', textStyle: { color: '#fff' } },
|
|
119
|
+
legend: { textStyle: { color: '#666' } },
|
|
120
|
+
axis: { axisLine: { lineStyle: { color: '#e9edf1' } }, axisLabel: { color: '#9aa0a6' }, splitLine: { lineStyle: { color: '#f0f3f7' } } }
|
|
121
|
+
};
|
|
122
|
+
myChart = echarts.init(el);
|
|
123
|
+
const userOption = ${option};
|
|
124
|
+
const merged = Object.assign({}, defaultTheme, userOption);
|
|
125
|
+
myChart.setOption(merged, true);
|
|
126
|
+
}
|
|
114
127
|
// store instance for global resize handling
|
|
115
128
|
window.__HECOM_CHARTS = window.__HECOM_CHARTS || [];
|
|
116
129
|
window.__HECOM_CHARTS.push(myChart);
|
|
@@ -192,6 +205,17 @@ function buildHtml(bugs, charts, meta) {
|
|
|
192
205
|
</div>
|
|
193
206
|
<script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
|
|
194
207
|
<script>
|
|
208
|
+
// 注册 macarons 主题(若可用)
|
|
209
|
+
(function(){
|
|
210
|
+
try {
|
|
211
|
+
const theme = ${macaronsForHtml};
|
|
212
|
+
if (typeof echarts !== 'undefined' && theme && Object.keys(theme).length) {
|
|
213
|
+
echarts.registerTheme('macarons', theme);
|
|
214
|
+
}
|
|
215
|
+
} catch (e) {
|
|
216
|
+
// 主题注册失败则忽略,chart 初始化中有回退处理
|
|
217
|
+
}
|
|
218
|
+
})();
|
|
195
219
|
${chartScripts}
|
|
196
220
|
</script>
|
|
197
221
|
</body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hecom/codearts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "华为云 CodeArts 统计分析工具",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"test:coverage": "jest --coverage --passWithNoTests",
|
|
19
19
|
"prepublishOnly": "npm run build",
|
|
20
20
|
"dev": "ts-node src/bin/cli.ts",
|
|
21
|
-
"minor": "npm version minor -m \"Bump version to %s\"; git push --tags",
|
|
22
|
-
"patch": "npm version patch -m \"Bump version to %s\"; git push --tags",
|
|
23
|
-
"major": "npm version major -m \"Bump version to %s\"; git push --tags"
|
|
21
|
+
"minor": "npm version minor -m \"Bump version to %s\"; git push --follow-tags",
|
|
22
|
+
"patch": "npm version patch -m \"Bump version to %s\"; git push --follow-tags",
|
|
23
|
+
"major": "npm version major -m \"Bump version to %s\"; git push --follow-tags"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"huawei-cloud",
|