From a14cc655ca8e97b8bfe1ffd4b26e73780fccbc4a Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 07 十二月 2023 19:29:37 +0800
Subject: [PATCH] 样式优化

---
 src/views/cockpitPage/components/MaterialChart.vue |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/views/cockpitPage/components/MaterialChart.vue b/src/views/cockpitPage/components/MaterialChart.vue
index b938e98..a8b1ebe 100644
--- a/src/views/cockpitPage/components/MaterialChart.vue
+++ b/src/views/cockpitPage/components/MaterialChart.vue
@@ -63,11 +63,19 @@
             axisPointer: {
               type: "none",
             },
+            textStyle: {
+              color: "#00FFFF",
+            },
+            borderColor: "#00FFFF",
+            backgroundColor: "#238d8d6b",
+            valueFormatter: function (value) {
+              return "鐗╂枡涓嶈冻鐨勬暟閲�:" + value;
+            },
           },
           grid: {
             right: "80px",
             bottom: "60px",
-            left: "60px",
+            left: "70px",
             top: "30px",
           },
           dataZoom: [
@@ -77,6 +85,9 @@
               show: false,
               startValue: that.startValue, // 浠庡ご寮�濮�
               endValue: that.endValue, // 涓�娆℃�у睍绀哄嚑涓�
+              zoomOnMouseWheel: false,
+              moveOnMouseWheel: true,
+              moveOnMouseMove: true,
             },
           ],
           legend: {
@@ -102,6 +113,7 @@
                 // rotate:45,
                 margin: 10,
                 show: true,
+                fontSize: 12,
                 textStyle: {
                   color: function (params, index) {
                     let colorList = ["#dcb018", "#00FFFF"];
@@ -111,6 +123,12 @@
                       return colorList[1];
                     }
                   },
+                },
+                formatter: function (value) {
+                  if (value.length > 5) {
+                    return `${value.slice(0, 4)}...`;
+                  }
+                  return value;
                 },
               },
               data: data.datax ? data.datax : [],
@@ -150,6 +168,9 @@
                 textStyle: {
                   color: "#00FFFF",
                 },
+                formatter: function (value) {
+                  return `${(value / 1000).toFixed(1)}k`;
+                },
               },
             },
           ],

--
Gitblit v1.8.0