From ca211e26921a3d6b925a01c646c474ad9ae68923 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期二, 08 九月 2026 14:13:07 +0800
Subject: [PATCH] 修正对比图表图例交互

---
 src/utils/reportMeasurementChart.ts |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/utils/reportMeasurementChart.ts b/src/utils/reportMeasurementChart.ts
index 9a7cf5e..bce2d7b 100644
--- a/src/utils/reportMeasurementChart.ts
+++ b/src/utils/reportMeasurementChart.ts
@@ -28,7 +28,8 @@
   })
   return {
     animation: false, color: colors, grid: { top: 40, right: 32, bottom: 42, left: 32, containLabel: true },
-    tooltip: { trigger: 'axis' }, legend: { show: false },
+    // 使用 ECharts 原生图例承载曲线显隐;外部图例仍用于来源说明和改色。
+    tooltip: { trigger: 'axis' }, legend: { show: true, type: 'scroll', top: 0, left: 32, right: 32, itemWidth: 12, itemHeight: 8, textStyle: { color: '#52606d', fontSize: 10 } },
     xAxis: { type: 'value', min: 0, name: '相对时间 / s', nameLocation: 'middle', nameGap: 28,
       axisLine: { lineStyle: { color: '#cbd8e4' } }, axisLabel: { color: '#8795a3', fontSize: 10 },
       nameTextStyle: { color: '#26333f', fontSize: 11, fontWeight: 600 } },

--
Gitblit v1.7.1