From 1d739783b70e11e964d86a882b00c20d2e000997 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 29 八月 2022 10:20:06 +0800
Subject: [PATCH] 1.修改top5从顶部开始排列

---
 src/utils/myEcharts.js |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index d13b9ba..87aa80a 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -360,6 +360,14 @@
 
   const titlename = titlenameArr
 
+  const length = titlename.length
+  if (titlename.length < 5) {
+    for (let i = 0; i < 5 - length; i++) {
+      titlename.push('0')
+    }
+  }
+
+  console.log(titlenameArr)
   const valdata = [683, 500, 400, 300, 200]
   // const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00']
   // const myColor = ['#0000FF']
@@ -408,8 +416,10 @@
           show: false
         },
         axisLabel: {
-          // color: '#d8d7d9',
-          color: '#fff',
+          // color: '#fff',
+          color: function(value, index) {
+            return value === '0' ? 'transparent' : '#fff'
+          },
           fontSize: 14,
           // formatter: function(value, index) {
           //   return [

--
Gitblit v1.9.3