Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -1
src/streamlit_app.py
CHANGED
|
@@ -7,6 +7,7 @@ import pandas as pd
|
|
| 7 |
import plotly.express as px
|
| 8 |
import plotly.graph_objects as go
|
| 9 |
from datetime import datetime
|
|
|
|
| 10 |
|
| 11 |
# ── Path setup so `src` is importable when running from src/ or project root ──
|
| 12 |
_here = Path(__file__).resolve().parent # src/
|
|
@@ -436,7 +437,12 @@ def render_chart(df: pd.DataFrame, chart_type_raw: str | None = None, key_prefix
|
|
| 436 |
|
| 437 |
if fig:
|
| 438 |
fig.update_layout(paper_bgcolor="#141720", plot_bgcolor="#0d0f14", font_color="#e8eaf0")
|
| 439 |
-
st.plotly_chart(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 440 |
|
| 441 |
def render_crosstab(df: pd.DataFrame):
|
| 442 |
"""
|
|
|
|
| 7 |
import plotly.express as px
|
| 8 |
import plotly.graph_objects as go
|
| 9 |
from datetime import datetime
|
| 10 |
+
import uuid
|
| 11 |
|
| 12 |
# ── Path setup so `src` is importable when running from src/ or project root ──
|
| 13 |
_here = Path(__file__).resolve().parent # src/
|
|
|
|
| 437 |
|
| 438 |
if fig:
|
| 439 |
fig.update_layout(paper_bgcolor="#141720", plot_bgcolor="#0d0f14", font_color="#e8eaf0")
|
| 440 |
+
st.st.plotly_chart(
|
| 441 |
+
fig,
|
| 442 |
+
use_container_width=True,
|
| 443 |
+
config={"displayModeBar": False},
|
| 444 |
+
key=f"{uuid.uuid4()}_plot"
|
| 445 |
+
)
|
| 446 |
|
| 447 |
def render_crosstab(df: pd.DataFrame):
|
| 448 |
"""
|