From b82c1f5e2c6daeede03f6fcf7c91ae66348d97e3 Mon Sep 17 00:00:00 2001
From: guoshipeng <3194674006@qq.com>
Date: Thu, 11 May 2023 16:03:21 +0800
Subject: [PATCH] 1、道路尘负荷分析尘负荷值修改 2、6参设定修改

---
 src/components/Echarts/LineChartSpe.vue |  101 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 69 insertions(+), 32 deletions(-)

diff --git a/src/components/Echarts/LineChartSpe.vue b/src/components/Echarts/LineChartSpe.vue
index e0b2056..0adc342 100644
--- a/src/components/Echarts/LineChartSpe.vue
+++ b/src/components/Echarts/LineChartSpe.vue
@@ -45,13 +45,10 @@
   },
   watch: {
     chartData: {
-      
       handler(val) {
-        console.log(val,'wath');
         this.setOptions(val)
       },
       deep: true,
-      
     },
   },
   mounted() {
@@ -72,7 +69,6 @@
       this.setOptions(this.chartData)
     },
     setOptions(val) {
-      console.log(val.series,'123');
       function fontSize(res) {
         let clientWidth =
           window.innerWidth ||
@@ -86,28 +82,30 @@
         {
           xAxis: {
             data: val.xAxis,
-            boundaryGap: false,
+            boundaryGap: true,
             axisTick: {
-              show: false,
+              show: true,
             },
+            
           },
           grid: {
-            left: 10,
+            left: 100,
             right: 10,
             bottom: 20,
             top: 30,
-            height: fontSize(3.5),
+            height: fontSize(4),
+            width: fontSize(15),
             containLabel: true,
           },
-          toolbox: {
-            feature: {
-              dataZoom: {
-                yAxisIndex: 'none',
-              },
-              restore: {},
-              saveAsImage: {},
-            },
-          },
+          // toolbox: {
+          //   feature: {
+          //     dataZoom: {
+          //       yAxisIndex: 'none',
+          //     },
+          //     restore: {},
+          //     saveAsImage: {},
+          //   },
+          // },
           // tooltip: {
           //   trigger: 'axis',
           //   position: function(pt) {
@@ -119,21 +117,61 @@
             position: function (pt) {
               return [pt[0], '10%']
             },
-            formatter(params) {
-              console.log(params,'ssss');
-              let data=[]
-              for (let i = 0; i < params.length; i++) {
-                data+=params[i].seriesName + '&nbsp:' +'&nbsp&nbsp'+params[i].value+ '<br/>'
-              }
-            return data
-            },
+            // formatter(params) {
+            //   console.log(params,'ssss');
+            //   let data=[]
+            //   for (let i = 0; i < params.length; i++) {
+            //     data+=params[i].seriesName + '&nbsp:' +'&nbsp&nbsp'+params[i].value+ '<br/>'
+            //   }
+            // return data
+            // },
           },
-         
-          yAxis: {
-            axisLabel: {
-              show: false,
+
+          yAxis: [
+            {
+              type: 'value',
+              position: 'left',
+              axisLabel: {
+                show: true,
+              },
             },
-          },
+            {
+              type: 'value',
+              position: 'right',
+              axisLabel: {
+                show: true,
+              },
+            },
+            {
+              type: 'value',
+              position: 'right',
+              offset: 50,
+              axisLabel: {
+                show: true,
+              },
+              min: 'dataMin', //���������������������������
+              max: 'dataMax', //���������������������������
+              min: function (value) {
+                //���������������������������������������
+                return Math.floor(value.min)
+              },
+              max: function (value) {
+                //���������������������������������������
+                return Math.ceil(value.max)
+              },
+
+              scale: true, //���������
+              minInterval: 0.1, //������������
+            },
+            {
+              type: 'value',
+              position: 'left',
+              axisLabel: {
+                show: true,
+              },
+              offset: 50,
+            },
+          ],
           legend: {
             icon: 'circle',
             itemHeight: 15,
@@ -151,10 +189,9 @@
             {
               start: 0,
               end: 10,
-              top:fontSize(4),
+              top: fontSize(4.5),
               height: fontSize(0.4),
             },
-            
           ],
           series: val.series,
           // [{

--
Gitblit v1.8.0