Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -112,13 +112,14 @@ def get_inputs(prefix):
|
|
112 |
}
|
113 |
return weight, composition, lifecycle_inputs
|
114 |
|
115 |
-
# Adjust graph
|
116 |
def style_figure(fig):
|
117 |
fig.update_layout(
|
118 |
-
plot_bgcolor="rgba(0,0,0,0.
|
119 |
-
paper_bgcolor="rgba(0,0,0,0.
|
120 |
-
font=dict(color="white") #
|
121 |
)
|
|
|
122 |
return fig
|
123 |
|
124 |
# Main application logic
|
@@ -154,7 +155,7 @@ if fiber_impact_data and transport_impact_data and washing_impact_data:
|
|
154 |
comparison_data.melt(id_vars="Footprint Type", var_name="Assessment", value_name="Value"),
|
155 |
x="Footprint Type",
|
156 |
y="Value",
|
157 |
-
|
158 |
title="Comparison of Assessments"
|
159 |
)
|
160 |
st.plotly_chart(style_figure(fig))
|
|
|
112 |
}
|
113 |
return weight, composition, lifecycle_inputs
|
114 |
|
115 |
+
# Adjust graph styling
|
116 |
def style_figure(fig):
|
117 |
fig.update_layout(
|
118 |
+
plot_bgcolor="rgba(0,0,0,0.7)", # 70% opacity
|
119 |
+
paper_bgcolor="rgba(0,0,0,0.7)", # 70% opacity
|
120 |
+
font=dict(color="white"), # White font for better visibility
|
121 |
)
|
122 |
+
fig.update_traces(marker_color="white") # Change bar color to white
|
123 |
return fig
|
124 |
|
125 |
# Main application logic
|
|
|
155 |
comparison_data.melt(id_vars="Footprint Type", var_name="Assessment", value_name="Value"),
|
156 |
x="Footprint Type",
|
157 |
y="Value",
|
158 |
+
color_discrete_sequence=["white"],
|
159 |
title="Comparison of Assessments"
|
160 |
)
|
161 |
st.plotly_chart(style_figure(fig))
|