From 4048393750de17cfa2ae59fec1380a81ea2b2a6b Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期一, 02 二月 2026 09:47:24 +0800
Subject: [PATCH] feat: 添加米重分析模块并优化综合看板功能

---
 app/pages/main_process_dashboard.py |   39 +++++++++++++++++++++++++++++++++------
 1 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/app/pages/main_process_dashboard.py b/app/pages/main_process_dashboard.py
index 74fce54..389a18d 100644
--- a/app/pages/main_process_dashboard.py
+++ b/app/pages/main_process_dashboard.py
@@ -111,8 +111,19 @@
                 fig_speed = px.line(df_speed, x='time', y='process_main_speed', 
                                    title="娴佺▼涓婚�熷害 (M/Min)",
                                    labels={'time': '鏃堕棿', 'process_main_speed': '涓婚�熷害 (M/Min)'})
-                fig_speed.update_layout(xaxis=dict(rangeslider=dict(visible=True), type='date'))
-                st.plotly_chart(fig_speed, width='stretch', config={'scrollZoom': True})
+                fig_speed.update_layout(
+                    xaxis=dict(rangeslider=dict(visible=True), type='date'),
+                                            yaxis=dict(fixedrange=False),
+                                            hovermode='x unified',
+                    dragmode='zoom',
+                )
+                st.plotly_chart(fig_speed, width='stretch', config={
+                    'scrollZoom': True, 
+                    'modeBarButtonsToAdd': ['zoom2d', 'zoomIn2d', 'zoomOut2d'], 
+                    'doubleClick': 'reset', 
+                    'displayModeBar': True,
+                    'toImageButtonOptions': {'format': 'png'}
+                })
             else:
                 st.info("璇ユ椂闂存鍐呮棤涓婚�熷害鏁版嵁")
 
@@ -126,9 +137,17 @@
                     title="鐢垫満绾块�� (M/Min)", 
                     xaxis_title="鏃堕棿", 
                     yaxis_title="绾块�� (M/Min)",
-                    xaxis=dict(rangeslider=dict(visible=True), type='date')
+                    xaxis=dict(rangeslider=dict(visible=True), type='date'),
+                                            yaxis=dict(fixedrange=False),
+                                            hovermode='x unified',
+                    dragmode='zoom'
                 )
-                st.plotly_chart(fig_motor, width='stretch', config={'scrollZoom': True})
+                st.plotly_chart(fig_motor, width='stretch', config={
+                    'scrollZoom': True, 
+                    'modeBarButtonsToAdd': ['zoom2d', 'zoomIn2d', 'zoomOut2d'], 
+                    'doubleClick': 'reset', 
+                    'displayModeBar': True
+                })
             else:
                 st.info("璇ユ椂闂存鍐呮棤鐢垫満鐩戞帶鏁版嵁")
 
@@ -165,8 +184,16 @@
                     title="涓敯鎸ゅ嚭鏈烘俯搴� (掳C)", 
                     xaxis_title="鏃堕棿", 
                     yaxis_title="娓╁害 (掳C)",
-                    xaxis=dict(rangeslider=dict(visible=True), type='date')
+                    xaxis=dict(rangeslider=dict(visible=True), type='date'),
+                                            yaxis=dict(fixedrange=False),
+                                            hovermode='x unified',
+                    dragmode='zoom'
                 )
-                st.plotly_chart(fig_temp, width='stretch', config={'scrollZoom': True})
+                st.plotly_chart(fig_temp, width='stretch', config={
+                    'scrollZoom': True, 
+                    'modeBarButtonsToAdd': ['zoom2d', 'zoomIn2d', 'zoomOut2d'], 
+                    'doubleClick': 'reset', 
+                    'displayModeBar': True
+                })
             else:
                 st.info("璇ユ椂闂存鍐呮棤娓╁害鎺у埗鏁版嵁")

--
Gitblit v1.9.3