Skip to content

Commit 6b00bb3

Browse files
committed
fix yAxis bug with ds dashboard
1 parent 1135ca6 commit 6b00bb3

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

web/src/apps/workflows/module/dispatch/dashboard/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export default {
231231
})
232232
successTotal.forEach((success, index) => {
233233
if (objTotal[index]) {
234-
successPercent[index] = (success / objTotal[index]).toFixed(1)
234+
successPercent[index] = parseInt((success / objTotal[index]) * 100)
235235
} else {
236236
successPercent[index] = 0
237237
}
@@ -287,10 +287,12 @@ export default {
287287
xAxis: {
288288
type: 'category',
289289
boundaryGap: false,
290-
data: ['2','4', '6', '8', '10','12','14','16','18','20','22','24']
290+
data: ['2时','4时', '6时', '8时', '10时','12时','14时','16时','18时','20时','22时','24时']
291291
},
292292
yAxis: {
293-
type: 'value'
293+
type: 'value',
294+
minInterval: 1,
295+
name: '实例数(个)'
294296
},
295297
series: [
296298
{
@@ -349,6 +351,7 @@ export default {
349351
{
350352
type: 'value',
351353
name: '实例数',
354+
minInterval: 1,
352355
/*min: 0,
353356
max: 250,
354357
interval: 50,*/

web/src/apps/workflows/module/dispatch/dashboard/source/defineUserCount.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export default {
3838
value: v.count
3939
}
4040
})
41-
const myChart = Chart.bar('#process-definition-bar', this.defineUserList, {barColor: '#89C2D9'})
41+
const myChart = Chart.bar('#process-definition-bar', this.defineUserList, {barColor: '#89C2D9', yAxis: {
42+
minInterval: 1
43+
}})
4244
myChart.echart.setOption(bar)
4345
// Jump not allowed on home page
4446
if (this.projectId) {

0 commit comments

Comments
 (0)