From 013ed9283200da41902835f9fd679df13299d436 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 31 八月 2023 12:53:53 +0800
Subject: [PATCH] 扬尘Vue

---
 src/views/line_graph/components/DustRadarChart.vue |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/src/views/line_graph/components/DustRadarChart.vue b/src/views/line_graph/components/DustRadarChart.vue
index 3541676..b0e5748 100644
--- a/src/views/line_graph/components/DustRadarChart.vue
+++ b/src/views/line_graph/components/DustRadarChart.vue
@@ -32,6 +32,7 @@
   },
   mounted() {
     this.initRadarChart();
+    window.addEventListener('resize', this.resizeChart);
   },
   methods: {
     initRadarChart() {
@@ -45,14 +46,6 @@
         },
         tooltip: {},
         radar: {
-          // 杞�
-          //         axisLine: {
-          //           show:true,
-          //           lineStyle: {
-          //             color: '#F53F3F' ,// 璁剧疆杈规绾跨殑棰滆壊涓洪粦鑹�
-          //             type:'dashed',
-          //           }
-          // },
 
           // 杈规棰滆壊
           splitLine: {
@@ -95,20 +88,37 @@
                   (this.yData[3] / 100).toFixed(4),
                   (this.yData[4] / 100).toFixed(4)
                 ],
+                // value: [
+                //   this.yData[0],
+                //   this.yData[1],
+                //   this.yData[2],
+                //   this.yData[3] ,
+                //   this.yData[4] 
+                // ],
                 name: '寮傚父鍒嗘瀽'
               }
             ],
             label: {
               show: true,
               formatter: function (params) {
-                return params.value;
+                
+                return params.value*100+'%';
               }
             }
           }
         ]
       };
       this.chart.setOption(option);
-    }
+    },
+        // 璺熼〉闈㈠搷搴斿紡鍙樺寲
+        resizeChart() {
+          // this.chart.resize();
+          this.$nextTick(() => {
+            if (this.chart) {
+              this.chart.resize();
+            }
+          });
+      }
   }
 };
 </script>

--
Gitblit v1.9.3