From d023899a62801203ab62d73f4a0d6b172b216b8d Mon Sep 17 00:00:00 2001 From: cdolfi Date: Thu, 9 May 2024 18:01:45 -0400 Subject: [PATCH] xaxis update --- .../visualizations/contrib_importance_over_time.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/8Knot/pages/contributors/visualizations/contrib_importance_over_time.py b/8Knot/pages/contributors/visualizations/contrib_importance_over_time.py index 63ce11cf..ca92273e 100644 --- a/8Knot/pages/contributors/visualizations/contrib_importance_over_time.py +++ b/8Knot/pages/contributors/visualizations/contrib_importance_over_time.py @@ -375,10 +375,12 @@ def create_figure(df_final, threshold, step_size): hovertemplate="%{y} people contributing to
%{customdata[0]}% of %{text} from
%{customdata[1]}
", ) + # update xaxes to show only the year + fig.update_xaxes(showgrid=True, ticklabelmode="period", dtick="M12", tickformat="%Y") + # layout styling fig.update_layout( xaxis_title=f"Timeline (stepsize = {step_size} months)", - xaxis=dict(tick0=start_date), yaxis_title="Lottery Factor", font=dict(size=14), margin_b=40,