From d6de7cce249a9b607809ba0bd9ffff46c67dca40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Fri, 10 Feb 2023 10:33:04 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E4=BB=AA=E8=A1=A8=E7=9B=98=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/components/ProgressChart.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/components/ProgressChart.vue b/src/views/dashboard/components/ProgressChart.vue index 2597c56c3..cdfe46cd3 100644 --- a/src/views/dashboard/components/ProgressChart.vue +++ b/src/views/dashboard/components/ProgressChart.vue @@ -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 },