From 88cc6e9805c5300d918c0363585c133bcee0cfe1 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Sun, 08 Oct 2023 12:01:14 +0800
Subject: [PATCH] Merge branch 'feature_1.0'

---
 src/views/deviceDetail/index.vue |   39 +++++++++++++++++++++++++++++++--------
 1 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/src/views/deviceDetail/index.vue b/src/views/deviceDetail/index.vue
index 9b4ab1c..581e30f 100644
--- a/src/views/deviceDetail/index.vue
+++ b/src/views/deviceDetail/index.vue
@@ -338,6 +338,7 @@
 // ���������import������������������from'������������������';
 
 import json from '@/assets/json/sensor.json'
+import * as echarts from 'echarts'
 // import { parse } from 'path-to-regexp'
 // import LineChart from '@/components/Echarts/LineChart'
 // import draggable from 'vuedraggable'
@@ -1231,7 +1232,7 @@
       const that = this
       var bar_dv = this.$refs.main
       if (bar_dv) {
-        that.myChart = this.$echarts.init(bar_dv)
+        that.myChart = echarts.init(bar_dv)
         var option = {
           title: {
             left: 'center',
@@ -1247,14 +1248,20 @@
             bottom: 25
           },
           tooltip: {
-            // formatter:function(res){
-            //   console.log(res,'res');
-            //   var result=''
-            //   var html1='<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#fff;"></span>'
-            //   result+=res[0].axisValue+"<br/>"+html1+res[0].value
-            //   return result
-            // },
+            formatter: function(res) {
+              console.log(res, 'res')
+              var result = ''
+              var html1 = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:red;"></span>'
+              result += res[0].axisValue + '<br/>' + html1 + res[0].value
+              return result
+            },
             trigger: 'axis',
+            backgroundColor: '#444', // ������������rgba������������������������������
+            color: 'red',
+            textStyle: { // ���������������������
+              color: '#fff',
+              fontSize: 12
+            },
             axisPointer: {
               type: 'cross',
               label: {
@@ -1283,6 +1290,22 @@
           },
           series: [
             {
+              // prettier-ignore
+              itemStyle: {
+                normal: {
+                  color: '#fff', // ������������
+                  borderColor: 'red', // ������������������
+                  borderWidth: 3// ������������������
+                },
+                emphasis: { // ������������������(������������������������)
+                  borderColor: '#c00', //  ������������������
+                  borderWidth: 2, //  ������������������
+                  shadowColor: '#c00', //  ������������
+                  shadowBlur: 3, //  ������������������������
+                  color: 'red'// hover������������������
+                }
+              },
+              symbolSize: 6,
               data: this.PM2_5Data,
               type: 'line',
               label: {

--
Gitblit v1.8.0