From 076d8685573236fd044bdbcd167b60652e8799cd Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Tue, 19 Sep 2023 17:20:09 +0800
Subject: [PATCH] Merge branch 'feature_1.0'

---
 src/components/Echarts/LineChart2.vue |   48 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/src/components/Echarts/LineChart2.vue b/src/components/Echarts/LineChart2.vue
index 5423c18..d32faf0 100644
--- a/src/components/Echarts/LineChart2.vue
+++ b/src/components/Echarts/LineChart2.vue
@@ -27,6 +27,10 @@
       type: Boolean,
       default: true,
     },
+    isMouse: {
+      type: Boolean,
+      default: false,
+    },
     chartData: {
       type: Object,
       required: true,
@@ -89,6 +93,42 @@
         return res * fontSize
       }
       let that = this
+      if (this.isMouse) {
+        this.chart.on('mouseover', function (params) {
+          that.chart.setOption({
+            series: [
+              {
+                name: params.seriesName,
+                label: {
+                  show: true,
+                  fontSize: 16,
+                  position: [10, -15],
+                  formatter: '{c}'
+                }
+              }
+            ]
+          })
+        })
+        // ���������������mouseout������������������������
+        this.chart.on('mouseout', function (params) {
+          that.chart.setOption({
+            series: [
+              {
+                name: params.seriesName,
+                lineStyle: {
+                  width: 2
+                },
+                label: {
+                  show: false
+                },
+                endLabel: {
+                  show: false
+                }
+              }
+            ]
+          })
+        })
+      }
       this.chart.setOption(
         {
           title: {
@@ -188,8 +228,14 @@
 
           yAxis: {
             axisTick: {
-              show: false, // ������������
+              show: true, // ������������
             },
+            axisLine: {
+              show: true, //���������������������
+            },
+            axisLabel: {
+              show: true, //������������������������������
+            }
             // axisLine: {
             //   lineStyle: {
             //     color: '#000000'

--
Gitblit v1.8.0