Skip to content

Commit 24ca965

Browse files
committed
fix legend color
1 parent 7c0654a commit 24ca965

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

code/pages/0_Data inventory.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,18 @@ def count_true_values(df, time_period, column):
299299
height=500,
300300
bargap=0.05, # Gap between bars of adjacent locations
301301
bargroupgap=0.1, # Gap between bars of the same location
302-
barmode='group', # Grouped style
302+
barmode="group", # Grouped style
303303
showlegend=True,
304+
title="Monthly counts",
304305
legend=dict(
305306
orientation="h", # Horizontal legend
306307
y=-0.2, # Position below the plot
307308
x=0.5, # Center the legend
308309
xanchor="center", # Anchor the legend's x position
309-
yanchor="top" # Anchor the legend's y position
310+
yanchor="top", # Anchor the legend's y position
310311
),
311-
title="Monthly counts"
312312
)
313-
313+
314314
return fig
315315

316316
def app():

code/util/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
# For plotly styling
4040
PLOTLY_FIG_DEFAULT = dict(
4141
font_family="Arial",
42+
legend_font_color='black',
4243
)
4344
PLOTLY_AXIS_DEFAULT = dict(
4445
showline=True,
@@ -98,6 +99,7 @@ def override_plotly_theme(
9899
color="black" # Font color
99100
)
100101

102+
# Figure-level settings
101103
fig.update_layout(
102104
font_size=22 * font_size_scale,
103105
hoverlabel_font_size=17 * font_size_scale,

0 commit comments

Comments
 (0)