Update src/streamlit_app.py
Browse files- 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 |
-
|
| 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 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 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 |
|