Eleventy-Blog: Why St. Plotly Charts Avoid Deprecation
- The Shock Divide Between Code & Warning First, surprising stat: once running "width=content" was warned, now it's the new way to avoid degradation.
- Why the Change? Simple truth: keyword kwargs on Plotly plots are now banned - this isn’t a bug, it’s a clean pivot.
- Core Clarity
In plain English: the
widthargument replaces st.plotly_chart’s old kwargs. No surprises - never a hidden dependency. - Hidden Blind Spots
Unexpected insight: deprecation warnings only when
kwargsappeared - not when used correctly. - Controversy Avoided But there's a catch: overusing width leads to harder debugging. Do it - but understand why.
- Bottom Line
So: refactor now. The next block of code with
widthavoids the deprecation entirely. But there is a catch: always check config first before defaulting.
This isn’t just about code - it's about strategy. Safety beats shock.
Let me ask you: what’s one legacy line in your codebase that’s quietly failing without warning?