From de5fdba84aecb0acef021b3a827e5cb081c58bf2 Mon Sep 17 00:00:00 2001 From: NY Date: Wed, 5 Mar 2025 11:48:14 +0800 Subject: [PATCH] =?UTF-8?q?ui=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/dash/app_html.py | 4 ++-- pkg/dash/func/render.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/dash/app_html.py b/pkg/dash/app_html.py index a555414..f7d1cc4 100644 --- a/pkg/dash/app_html.py +++ b/pkg/dash/app_html.py @@ -111,9 +111,9 @@ def layout_config(app): ), html.Div(id='multi-tweet-summary', style={'fontSize': '20px', 'margin': '10px'}), dcc.Tabs(id='tabs', value='line', children=[ - dcc.Tab(label='Line Chart', value='line'), + dcc.Tab(label='Line', value='line'), dcc.Tab(label='Heatmap', value='heatmap'), - dcc.Tab(label='One Day Heatmap Plot', value='one_day_heatmap'), + dcc.Tab(label='1-dayHeatmap', value='one_day_heatmap'), ]), html.Div(id='tabs-content'), ], style={'marginLeft': '50px'}), diff --git a/pkg/dash/func/render.py b/pkg/dash/func/render.py index df47a61..fa515f2 100644 --- a/pkg/dash/func/render.py +++ b/pkg/dash/func/render.py @@ -108,10 +108,10 @@ def render_tab_content(tab, selected_dates, interval, time_zones, days_to_displa fig = go.Figure(data=go.Heatmap( z=z_values, x=x_labels, - y=[f"{h:02d}:00" for h in hours], + y=[f"{h:02d}" for h in hours], colorscale='Viridis', hoverongaps=False, - hovertemplate='%{y} %{x} EST
Tweets: %{z}' + hovertemplate='%{y}:%{x} EST
Tweets: %{z}' )) if tab in ['line', 'one_day_heatmap']: