From 2e6cfde0e6533c734bd5fe81a5d62b931098f6a3 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 05 十二月 2023 16:51:51 +0800
Subject: [PATCH] 人员,物料y轴超出文字点点点

---
 src/views/cockpitPage/components/DeviceChart.vue           |    5 +++--
 src/views/cockpitPage/components/PerSonnelProductivity.vue |   13 ++++++++++---
 src/views/cockpitPage/components/MaterialChart.vue         |    9 ++++++++-
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/views/cockpitPage/components/DeviceChart.vue b/src/views/cockpitPage/components/DeviceChart.vue
index f4ea752..79d1705 100644
--- a/src/views/cockpitPage/components/DeviceChart.vue
+++ b/src/views/cockpitPage/components/DeviceChart.vue
@@ -69,7 +69,7 @@
           grid: {
             right: "80px",
             bottom: "60px",
-            left: "60px",
+            left: "70px",
             top: "30px",
           },
           dataZoom: [
@@ -104,6 +104,7 @@
                 // rotate:45,
                 margin: 10,
                 show: true,
+                fontSize:12,
                 textStyle: {
                   color: function (params, index) {
                     let colorList = ["#dcb018", "#00FFFF"];
@@ -115,7 +116,7 @@
                   },
                 },
                 formatter: function (value) {
-                  if (value.length > 6) {
+                  if (value.length > 5) {
                     return `${value.slice(0, 4)}...`;
                   }
                   return value;
diff --git a/src/views/cockpitPage/components/MaterialChart.vue b/src/views/cockpitPage/components/MaterialChart.vue
index b938e98..97308a0 100644
--- a/src/views/cockpitPage/components/MaterialChart.vue
+++ b/src/views/cockpitPage/components/MaterialChart.vue
@@ -67,7 +67,7 @@
           grid: {
             right: "80px",
             bottom: "60px",
-            left: "60px",
+            left: "70px",
             top: "30px",
           },
           dataZoom: [
@@ -102,6 +102,7 @@
                 // rotate:45,
                 margin: 10,
                 show: true,
+                fontSize:12,
                 textStyle: {
                   color: function (params, index) {
                     let colorList = ["#dcb018", "#00FFFF"];
@@ -112,6 +113,12 @@
                     }
                   },
                 },
+                formatter: function (value) {
+                  if (value.length > 5) {
+                    return `${value.slice(0, 4)}...`;
+                  }
+                  return value;
+                },
               },
               data: data.datax ? data.datax : [],
             },
diff --git a/src/views/cockpitPage/components/PerSonnelProductivity.vue b/src/views/cockpitPage/components/PerSonnelProductivity.vue
index 27a0c8b..904cdf8 100644
--- a/src/views/cockpitPage/components/PerSonnelProductivity.vue
+++ b/src/views/cockpitPage/components/PerSonnelProductivity.vue
@@ -73,7 +73,7 @@
           grid: {
             right: "80px",
             bottom: "60px",
-            left: "60px",
+            left: "70px",
             top: "30px",
           },
           dataZoom: [
@@ -108,6 +108,7 @@
                 // rotate:45,
                 margin: 10,
                 show: true,
+                fontSize:12,
                 textStyle: {
                   color: function (params, index) {
                     let colorList = ["#dcb018", "#00FFFF"];
@@ -117,6 +118,12 @@
                       return colorList[1];
                     }
                   },
+                },
+                formatter: function (value) {
+                  if (value.length > 5) {
+                    return `${value.slice(0, 4)}...`;
+                  }
+                  return value;
                 },
               },
               data: data.datax ? data.datax : [],
@@ -224,8 +231,8 @@
                 z: 3,
                 style: {
                   image: img,
-                  width: 238,
-                  height: 238,
+                  width: 240,
+                  height: 240,
                 },
                 left: "center",
                 top: "center",

--
Gitblit v1.8.0