Inside Fiwkdrsga Mjdemg Plotly_chart Kwargs Deprecation
The sudden kwargs deprecation warning in st.plotly_chart - even when using width="content" - represents a meaningful regression. Previously, passing width directly bypassed the deprecated kwargs route entirely, silently applying layout width without error. Now, despite width="content" being accepted, the kwargs keyword is still flagged in warnings, breaking the expected seamless behavior.
This shift disrupts intuitive usage: developers used to rely on width alone to control chart sizing, but now warnings confuse even valid calls, forcing a mental pivot to config or explicit width parameters. The deprecation warning, while informative, adds noise in an otherwise fluid workflow.
The core issue lies in how Plotly’s documentation and internal API evolution failed to fully align the legacy kwargs pattern with the new config-driven paradigm. While deprecation is necessary to future-proof the library, the transition here feels abrupt - especially given that width was already functional.
For now, the safest path: use width="content" explicitly and avoid any keyword arguments. Over time, streamlit and plotly teams should clarify this behavior in docs to prevent user confusion. Until then, expect subtle warnings when using width alongside kwargs - a shift from elegance to fragmentation.
Is this a regression?
Yes - because the expected behavior of clean, direct width control via width alone is now marred by inconsistent warnings.
The bottom line: While the change aligns with modern API standards, the implementation feels incomplete. Use st.plotly_chart(fig, width="content") without kwargs. Trust the warning as a guide, not a bug, but expect noise until official docs resolve the inconsistency.