From 301532b5c1cad2c1d45080bfef86579b20486bf5 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 25 十二月 2024 10:33:23 +0800 Subject: [PATCH] 首页调整、考核结果页面调整 --- src/views/home/data-chart/index.vue | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/home/data-chart/index.vue b/src/views/home/data-chart/index.vue index 7dc8aec..48f1994 100644 --- a/src/views/home/data-chart/index.vue +++ b/src/views/home/data-chart/index.vue @@ -43,6 +43,8 @@ }, methods: { initChart() { + const sortedKeys = Object.keys(this.acitveData.state) + .sort(); // 鎸夌収瀛楃涓茬殑瀛楀吀搴忓閿繘琛屾帓搴� const option = { legend: { right: 'right', @@ -74,13 +76,13 @@ tooltip: {}, xAxis: { type: 'category', - data: Object.keys(this.acitveData.state), + data: sortedKeys, }, yAxis: {}, series: [ { name: '姝e父鏁�', - data: Object.entries(this.acitveData.state).map(([key, value]) => value), + data: sortedKeys.map(key => this.acitveData.state[key]), type: 'line', itemStyle: { color: 'rgba(62, 144, 247, 1)' @@ -88,7 +90,7 @@ }, { name: '寮傚父鏁�', - data: Object.entries(this.acitveData.state2).map(([key, value]) => value), + data: sortedKeys.map(key => this.acitveData.state2[key]), type: 'line', itemStyle: { color: 'rgba(85, 192, 191, 1)' -- Gitblit v1.8.0