فهرست منبع

feat(图表): 添加拖拽放大功能并增加操作提示

为价格对比图和价格差异图添加拖拽框选放大功能
配置拖拽区域的样式并添加操作提示文本
skyfffire 1 هفته پیش
والد
کامیت
ecb764d537
1فایلهای تغییر یافته به همراه14 افزوده شده و 0 حذف شده
  1. 14 0
      src/dashboard/static/index.html

+ 14 - 0
src/dashboard/static/index.html

@@ -371,6 +371,7 @@
                         <div class="chart-container">
                     <h3>价格对比图 
                         <button class="btn" style="float: right; padding: 8px 16px; font-size: 0.8em; margin-top: -5px;" onclick="resetPriceChartZoom()">重置缩放</button>
+                        <span style="float: right; margin-right: 10px; font-size: 0.8em; color: #666; margin-top: 2px;">💡 拖拽框选区域可放大</span>
                     </h3>
                     <div class="chart-wrapper">
                         <canvas id="priceChart"></canvas>
@@ -380,6 +381,7 @@
                 <div class="chart-container">
                     <h3>价格差异图
                         <button class="btn" style="float: right; padding: 8px 16px; font-size: 0.8em; margin-top: -5px;" onclick="resetDiffChartZoom()">重置缩放</button>
+                        <span style="float: right; margin-right: 10px; font-size: 0.8em; color: #666; margin-top: 2px;">💡 拖拽框选区域可放大</span>
                     </h3>
                     <div class="chart-wrapper">
                         <canvas id="diffChart"></canvas>
@@ -696,6 +698,12 @@
                                 pinch: {
                                     enabled: true
                                 },
+                                drag: {
+                                    enabled: true,
+                                    backgroundColor: 'rgba(102, 126, 234, 0.2)',
+                                    borderColor: 'rgba(102, 126, 234, 0.8)',
+                                    borderWidth: 2,
+                                },
                                 mode: 'x',
                             },
                             pan: {
@@ -807,6 +815,12 @@
                                 pinch: {
                                     enabled: true
                                 },
+                                drag: {
+                                    enabled: true,
+                                    backgroundColor: 'rgba(102, 126, 234, 0.2)',
+                                    borderColor: 'rgba(102, 126, 234, 0.8)',
+                                    borderWidth: 2,
+                                },
                                 mode: 'x',
                             },
                             pan: {