Breaking Down Upwrsssgo Fdklzu Plotly_chart Kwargs
Could using width="content" in st.plotly_chart finally stop triggering the frustrating deprecation warning?
After testing, the warning still pops up - even with width="content" - meaning the change isn’t fully effective.
Streamlit’s st.plotly_chart still clings to old kwargs parsing logic, causing confusion.
The real fix: remove kwargs entirely and pass config for layout control - this aligns with updated docs and silences warnings.
But here’s the catch: hiding deprecation warnings isn’t safe.
Best practice: use fig.update_layout(width="content") without **kwargs in arguments.
Still, if you’re relying on kwargs for flexibility, consider refactoring to avoid passing unsupported parameters - Streamlit’s config system offers cleaner, future-proof control.
Is this a regression? Yes - what worked, now fails to suppress warnings.
Stick to width="content" and fig.update_layout(width="content") to keep your plots clean, safe, and modern.
The bottom line: don’t depend on hiding deprecation notices - embrace the real fix.