Procházet zdrojové kódy

性能下降echart图

chenminghua před 3 roky
rodič
revize
41cd2be8d1

+ 23 - 8
src/views/sampleDatabase/performance/performanceEcharts.vue

@@ -65,7 +65,7 @@ export default {
       let option = {
         legend: {
           show: true,
-          data: ["功率曲线", "风速曲线"],
+          data: ["实发功率","理论功率", "实时风速"],
           right: 120,
           icon: "ract",
           itemWidth: 8,
@@ -98,13 +98,13 @@ export default {
             boundaryGap: false,
             axisLabel: {
               interval:
-                Number((this.xdata.length / 8).toFixed(0)) > 2
-                  ? Number((this.xdata.length / 8).toFixed(0))
+                Number((this.xdata.length / 6).toFixed(0)) > 2
+                  ? Number((this.xdata.length / 6).toFixed(0))
                   : 0,
               showMinLabel: true,
               showMaxLabel: true,
               formatter: "{value}",
-              fontSize: 14,
+              fontSize: 12,
               textStyle: {
                 color: "#606769",
               },
@@ -129,7 +129,7 @@ export default {
         // },
         yAxis: [
           {
-            name: "功率",
+            name: "功率(kWh)",
             type: "value",
             axisTick: {
               show: false,
@@ -143,7 +143,7 @@ export default {
             },
           },
           {
-            name: "风速",
+            name: "风速(m/s)",
             type: "value",
             axisTick: {
               show: false,
@@ -165,7 +165,22 @@ export default {
           arr.push(item.doubleValue);
         });
         let obj = {
-          name: "功率曲线",
+          name: "实发功率",
+          type: "line",
+          data: arr,
+          smooth: true, //平滑展示
+          yAxisIndex: 0,
+        };
+
+        option.series.push(obj);
+      }
+      if (this.data.llglpower.length > 0) {
+        let arr = [];
+        this.data.llglpower.forEach((item) => {
+          arr.push(item.doubleValue);
+        });
+        let obj = {
+          name: "理论功率",
           type: "line",
           data: arr,
           smooth: true, //平滑展示
@@ -180,7 +195,7 @@ export default {
           arr.push(item.doubleValue);
         });
         let obj = {
-          name: "风速曲线",
+          name: "实时风速",
           type: "line",
           data: arr,
           smooth: true, //平滑展示