conghelong 8 месяцев назад
Родитель
Сommit
eccf480888
1 измененных файлов с 27 добавлено и 24 удалено
  1. 27 24
      screen-demo/src/views/templateInstance.vue

+ 27 - 24
screen-demo/src/views/templateInstance.vue

@@ -111,11 +111,10 @@
         </div>
         <div id="echarts2" style="width: 100%; height: 47vh">
         </div>
-
         <div class="jl-page">
           <span>&lt;</span>
           <b class="on">1</b>
-          <b>2</b>
+
           <span>&gt;</span>
         </div>
       </div>
@@ -920,9 +919,9 @@ export default {
       for (let i = 0; i < getName.length; i++) {
         getMax.push(max);
       }
-      var zdslColorList = ['#D0A00E', '#34DA62', '#00C0E9', '#0096F3', '#33CCFF']
+      var zdslColorList = '#33CCFF'
       let option = {
-        // backgroundColor:'#001037',
+
         grid: {
           top: '5%',
           left: '3%',
@@ -981,31 +980,35 @@ export default {
             data: b
           }
         ],
-
-        series: [{
-
-          type: "bar",
-          barWidth: "10%",
-          yAxisIndex: 0,
-          data: [50, 50, 50, 50, 50].map((item, i) => {
-            return {
-              value: item,
-              itemStyle: {
-                color: "rgba(0,0,0,0)",
-                barBorderColor: zdslColorList[i],
-                borderWidth: 1,
-                shadowColor: "#33CCFF",
-                shadowBlur: 4
+        series: [
+          {
+            type: "bar",
+            barWidth: "12%",
+            yAxisIndex: 0,
+            data: getMax.map((item, i) => {
+              return {
+                value: item,
+                itemStyle: {
+                  color: "rgba(0,0,0,0)",
+                  barBorderColor: zdslColorList[i],
+                  borderWidth: 1,
+                  shadowColor: "#33CCFF",
+                  shadowBlur: 4
+                }
               }
+            }),
+            tooltip: {
+              show: false  // 将 tooltip 设为不显示
             }
-          }),
-        },
+          },
           {
-            name: a, //这个是Bar图
-            type: 'bar',
+            type: "bar",
             yAxisIndex: 1,
             barWidth: "10%",
-            data: b,
+            data: getValue,
+            tooltip: {
+              show: false  // 将 tooltip 设为不显示
+            }
           }
         ],
         itemStyle: {