mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 15:11:16 +00:00
perf: 优化控制台仪表盘显示
This commit is contained in:
parent
8ecd2cfc6a
commit
d6de7cce24
@ -45,7 +45,8 @@ export default {
|
||||
const total = _.sumBy(this.data, function(i) { return i.total })
|
||||
for (let i = 0, len = this.data.length; i < len; i++) {
|
||||
const current = this.data[i]
|
||||
const num = (current.total / total) * 100
|
||||
let num = (current.total / total) * 100
|
||||
num = _.floor(num, 2)
|
||||
const color = '#' + Math.floor(Math.random() * (256 * 256 * 256 - 1)).toString(16)
|
||||
seriesList.push({
|
||||
type: 'bar',
|
||||
@ -132,7 +133,7 @@ export default {
|
||||
grid: {
|
||||
top: '60%',
|
||||
containLabel: true,
|
||||
bottom: '0',
|
||||
bottom: '-10',
|
||||
left: '0%',
|
||||
right: 1
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user