From 08dd2afd7a9614dad029e94918516b068d413cac Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期四, 04 七月 2024 17:46:41 +0800
Subject: [PATCH] 大屏

---
 代码管理/大屏/src/components/echart/bottom/bottomLeftChart/chart.vue |   39 ++++++++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 15 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue"
index ba8bd9c..5cc6fb6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue"
@@ -1,18 +1,14 @@
 <template>
   <div>
     <!-- 骞村害寮�宸ョ巼 -->
-    <Echart
-      :options="options"
-      id="bottomLeftChart"
-      height="480px"
-    ></Echart>
+    <Echart :options="options" id="bottomLeftChart" height="480px"></Echart>
   </div>
 </template>
 
 <script>
 import Echart from '@/common/echart'
 export default {
-  data () {
+  data() {
     return {
       options: {},
     };
@@ -28,7 +24,7 @@
   },
   watch: {
     cdata: {
-      handler (newData) {
+      handler(newData) {
         this.options = {
           title: {
             text: "",
@@ -50,11 +46,9 @@
               color: "#B4B4B4"
             },
             top: "0%",
-            left:"15%"
-            
           },
           grid: {
-            x: "8%",
+            x: "12%",
             width: "90%",
             y: "4%"
           },
@@ -113,14 +107,22 @@
             {
               name: "鍑哄簱閲�",
               type: "bar",
-              barWidth: 40,
+              barWidth: 25,
               itemStyle: {
                 normal: {
                   barBorderRadius: 5,
                   color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
                     { offset: 0, color: "#956FD4" },
                     { offset: 1, color: "#3EACE5" }
-                  ])
+                  ]),
+                  label: {
+                    show: true, // 鏄剧ず鏍囩
+                    position: 'top', // 鏍囩浣嶇疆锛屽彲浠ヨ缃� 'top', 'insideTop', 'inside', 'insideBottom' 绛�
+                    formatter: '{c}', // 鏍囩鍐呭鏍煎紡鍣紝{c} 琛ㄧず鏁版嵁鍊�
+                    fontSize: 14, // 鏍囩鏂囧瓧澶у皬锛岄粯璁や负 12
+                    fontWeight: 'bold', // 鏍囩鏂囧瓧绮楃粏锛岄粯璁や负 'normal'
+                    color: '#ffffff' // 鏍囩鏂囧瓧棰滆壊锛岄粯璁や负 '#333'
+                  }
                 }
               },
               data: newData.barData
@@ -128,8 +130,7 @@
             {
               name: "鍏ュ簱閲�",
               type: "bar",
-              barGap: "-100%",
-              barWidth: 40,
+              barWidth: 25,
               itemStyle: {
                 normal: {
                   barBorderRadius: 5,
@@ -137,7 +138,15 @@
                     { offset: 0, color: "rgba(156,107,211,0.8)" },
                     { offset: 0.2, color: "rgba(156,107,211,0.5)" },
                     { offset: 1, color: "rgba(156,107,211,0.2)" }
-                  ])
+                  ]),
+                  label: {
+                    show: true, // 鏄剧ず鏍囩
+                    position: 'top', // 鏍囩浣嶇疆锛屽彲浠ヨ缃� 'top', 'insideTop', 'inside', 'insideBottom' 绛�
+                    formatter: '{c}', // 鏍囩鍐呭鏍煎紡鍣紝{c} 琛ㄧず鏁版嵁鍊�
+                    fontSize: 14, // 鏍囩鏂囧瓧澶у皬锛岄粯璁や负 12
+                    fontWeight: 'bold', // 鏍囩鏂囧瓧绮楃粏锛岄粯璁や负 'normal'
+                    color: '#ffffff' // 鏍囩鏂囧瓧棰滆壊锛岄粯璁や负 '#333'
+                  }
                 }
               },
               z: -12,

--
Gitblit v1.9.3