TimWindecker commited on
Commit
3a90fbb
·
verified ·
1 Parent(s): 502a22b

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +23 -13
src/streamlit_app.py CHANGED
@@ -171,7 +171,7 @@ def create_bar_chart(df, view_type):
171
  y="score",
172
  color="score",
173
  color_continuous_scale=px.colors.diverging.Fall,
174
- #TODO template="plotly_white",
175
  orientation="v",
176
  )
177
 
@@ -183,6 +183,16 @@ def create_bar_chart(df, view_type):
183
  xaxis_tickangle=-45,
184
  bargap=0.2, # Increase gap for slimmer bars
185
  height=500, # Set the height of the plot
 
 
 
 
 
 
 
 
 
 
186
  )
187
 
188
  # Remove the color legend from the chart.
@@ -259,18 +269,18 @@ def create_bar_chart(df, view_type):
259
  # )
260
 
261
  # Common styling
262
- fig.update_layout(
263
- plot_bgcolor='rgba(0,0,0,0)',
264
- paper_bgcolor='rgba(0,0,0,0)',
265
- showlegend=(view_type != "Total Score"),
266
- margin=dict(
267
- l=0, # left
268
- r=0, # right
269
- b=0, # bottom
270
- t=5, # top
271
- pad=0 # padding
272
- ),
273
- )
274
  fig.update_xaxes(showgrid=False)
275
  fig.update_yaxes(showgrid=True, gridcolor='lightgray', gridwidth=0.5)
276
 
 
171
  y="score",
172
  color="score",
173
  color_continuous_scale=px.colors.diverging.Fall,
174
+ template="plotly_white",
175
  orientation="v",
176
  )
177
 
 
183
  xaxis_tickangle=-45,
184
  bargap=0.2, # Increase gap for slimmer bars
185
  height=500, # Set the height of the plot
186
+ plot_bgcolor="rgba(0,0,0,0)",
187
+ paper_bgcolor="rgba(0,0,0,0)",
188
+ showlegend=(view_type != "Total Score"),
189
+ margin=dict(
190
+ l=0, # left
191
+ r=0, # right
192
+ b=0, # bottom
193
+ t=5, # top
194
+ pad=0 # padding
195
+ ),
196
  )
197
 
198
  # Remove the color legend from the chart.
 
269
  # )
270
 
271
  # Common styling
272
+ # TODO fig.update_layout(
273
+ # plot_bgcolor='rgba(0,0,0,0)',
274
+ # paper_bgcolor='rgba(0,0,0,0)',
275
+ # showlegend=(view_type != "Total Score"),
276
+ # margin=dict(
277
+ # l=0, # left
278
+ # r=0, # right
279
+ # b=0, # bottom
280
+ # t=5, # top
281
+ # pad=0 # padding
282
+ # ),
283
+ # )
284
  fig.update_xaxes(showgrid=False)
285
  fig.update_yaxes(showgrid=True, gridcolor='lightgray', gridwidth=0.5)
286