From 7d8dd3c5a1f9e2ea06177b6612f7eec62ce2d16e Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期一, 15 九月 2025 16:47:48 +0800
Subject: [PATCH] ID1766-隐藏检测记录/叫号按钮

---
 src/views/test.vue |  108 ++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 69 insertions(+), 39 deletions(-)

diff --git a/src/views/test.vue b/src/views/test.vue
index d58184d..ddbe68b 100644
--- a/src/views/test.vue
+++ b/src/views/test.vue
@@ -29,45 +29,75 @@
   
         const option = {
           title: {
-            text: '营养状态和透析情况',
-            left: 'center'
-          },
-          tooltip: {
-            trigger: 'axis'
-          },
-          xAxis: {
-            type: 'category',
-            data: ['12:21', '12:22', '12:23', '12:24', '12:25', '12:26', '12:27', '12:28', '12:29', '12:30', '12:31', '12:32', '12:33', '12:34', '12:35', '12:36', '12:37', '12:38']
-          },
-          yAxis: {
-            type: 'value'
-          },
-          series: [
-            {
-              data: [1.4, 1.2, 1.4, 1.4, 1.0, 1.4, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.7],
-              type: 'line',
-              smooth: true,
-              color:'red',
-              itemStyle: {
-                color: function(params) {
-                  if (params.value > 1.2) {
-                      return 'red';
-                  } else {
-                      return 'blue';
-                  }
-                }.bind(this)
-              },
-              lineStyle: {
-                color: function(params) {
-                  if (params.value > 1.2) {
-                      return 'red';
-                  } else {
-                      return 'blue';
-                  }
-                }.bind(this)
-              }
-            }
-          ]
+    text: 'Distribution of Electricity',
+    subtext: 'Fake Data'
+  },
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'cross'
+    }
+  },
+  toolbox: {
+    show: true,
+    feature: {
+      saveAsImage: {}
+    }
+  },
+  xAxis: {
+    type: 'category',
+    boundaryGap: false,
+    // prettier-ignore
+    data: ['00:00', '01:15', '02:30', '03:45', '05:00', '06:15', '07:30', '08:45', '10:00', '11:15', '12:30', '13:45', '15:00', '16:15', '17:30', '18:45', '20:00', '21:15', '22:30', '23:45']
+  },
+  yAxis: {
+    type: 'value',
+    axisLabel: {
+      formatter: '{value} W'
+    },
+    axisPointer: {
+      snap: true
+    }
+  },
+  visualMap: {
+    show: false,
+    dimension: 0,
+    pieces: [
+      {
+        lte: 2,
+        color: 'green'
+      },
+      {
+        gt: 2,
+        lte: 8,
+        color: 'red'
+      },
+      {
+        gt: 8,
+        lte: 14,
+        color: 'green'
+      },
+      {
+        gt: 14,
+        lte: 17,
+        color: 'red'
+      },
+      {
+        gt: 17,
+        color: 'green'
+      }
+    ]
+  },
+  series: [
+    {
+      name: 'Electricity',
+      type: 'line',
+      smooth: true,
+      // prettier-ignore
+      data: [300, 280, 250, 260, 270, 300, 550, 500, 400, 390, 380, 390, 400, 500, 600, 750, 800, 700, 600, 400],
+     
+    }
+  ]
         };
   
         this.chartInstance.setOption(option);

--
Gitblit v1.8.0