Skip to content

Commit

Permalink
xaxis update
Browse files Browse the repository at this point in the history
  • Loading branch information
cdolfi committed May 9, 2024
1 parent 073479b commit d023899
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,12 @@ def create_figure(df_final, threshold, step_size):
hovertemplate="%{y} people contributing to<br>%{customdata[0]}% of %{text} from<br>%{customdata[1]}<br><extra></extra>",
)

# 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,
Expand Down

0 comments on commit d023899

Please sign in to comment.