Spaces:
Running
Running
Commit ·
bb80198
1
Parent(s): 9048554
Fix Logistics products chart y-axis range (0-110)
Browse files
app.py
CHANGED
|
@@ -596,7 +596,13 @@ elif selected_view == "Logistics":
|
|
| 596 |
name="Lost (non-returns + scrap)", marker_color="#e74c3c",
|
| 597 |
text=[f"{v:.0f}" if v > 0 else "" for v in lifecycle_df["Products Lost"]], textposition="outside",
|
| 598 |
))
|
| 599 |
-
fig_products.update_layout(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 600 |
st.plotly_chart(fig_products, use_container_width=True)
|
| 601 |
|
| 602 |
final_in_service = lifecycle_df.iloc[-1]["Products in Service"]
|
|
|
|
| 596 |
name="Lost (non-returns + scrap)", marker_color="#e74c3c",
|
| 597 |
text=[f"{v:.0f}" if v > 0 else "" for v in lifecycle_df["Products Lost"]], textposition="outside",
|
| 598 |
))
|
| 599 |
+
fig_products.update_layout(
|
| 600 |
+
barmode="group",
|
| 601 |
+
yaxis_title="Number of Products (per 100)",
|
| 602 |
+
yaxis=dict(range=[0, 110], rangemode='tozero'),
|
| 603 |
+
xaxis_title="",
|
| 604 |
+
legend=dict(orientation="h", yanchor="bottom", y=1.02),
|
| 605 |
+
)
|
| 606 |
st.plotly_chart(fig_products, use_container_width=True)
|
| 607 |
|
| 608 |
final_in_service = lifecycle_df.iloc[-1]["Products in Service"]
|