Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -11
src/streamlit_app.py
CHANGED
|
@@ -82,15 +82,6 @@ st.markdown("""
|
|
| 82 |
text-align: center;
|
| 83 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 84 |
}
|
| 85 |
-
.ai-action-button {
|
| 86 |
-
background: linear-gradient(135deg, #4299e1, #3182ce);
|
| 87 |
-
color: white;
|
| 88 |
-
border: none;
|
| 89 |
-
padding: 0.5rem 1rem;
|
| 90 |
-
border-radius: 6px;
|
| 91 |
-
cursor: pointer;
|
| 92 |
-
margin: 0.2rem;
|
| 93 |
-
}
|
| 94 |
</style>
|
| 95 |
""", unsafe_allow_html=True)
|
| 96 |
|
|
@@ -346,7 +337,7 @@ with tab2:
|
|
| 346 |
|
| 347 |
st.markdown("### Daily Timeline Analysis (Next 15 Days)")
|
| 348 |
|
| 349 |
-
# Create timeline visualization similar to your reference
|
| 350 |
fig = go.Figure()
|
| 351 |
|
| 352 |
for sku in df['SKU'].unique()[:3]: # Show top 3 SKUs for clarity
|
|
@@ -363,7 +354,7 @@ with tab2:
|
|
| 363 |
name=f"{sku_data.iloc[0]['PartName']} ({sku_data.iloc[0]['Supplier']})",
|
| 364 |
marker_color=colors,
|
| 365 |
text=[f"{rate:.0f}%" for rate in sku_data['FulfillmentRate']],
|
| 366 |
-
textposition='
|
| 367 |
textfont=dict(color='white', size=10),
|
| 368 |
hovertemplate=f"<b>{sku}</b><br>Date: %{{x}}<br>Fulfillment: %{{text}}<extra></extra>"
|
| 369 |
))
|
|
|
|
| 82 |
text-align: center;
|
| 83 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 84 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
</style>
|
| 86 |
""", unsafe_allow_html=True)
|
| 87 |
|
|
|
|
| 337 |
|
| 338 |
st.markdown("### Daily Timeline Analysis (Next 15 Days)")
|
| 339 |
|
| 340 |
+
# Create timeline visualization similar to your reference - FIXED VERSION
|
| 341 |
fig = go.Figure()
|
| 342 |
|
| 343 |
for sku in df['SKU'].unique()[:3]: # Show top 3 SKUs for clarity
|
|
|
|
| 354 |
name=f"{sku_data.iloc[0]['PartName']} ({sku_data.iloc[0]['Supplier']})",
|
| 355 |
marker_color=colors,
|
| 356 |
text=[f"{rate:.0f}%" for rate in sku_data['FulfillmentRate']],
|
| 357 |
+
textposition='inside', # FIXED: Valid textposition value
|
| 358 |
textfont=dict(color='white', size=10),
|
| 359 |
hovertemplate=f"<b>{sku}</b><br>Date: %{{x}}<br>Fulfillment: %{{text}}<extra></extra>"
|
| 360 |
))
|