[AdvancedLayouts] Modernize width and height for st.area_chart and st.bar_chart#12672
Merged
sfc-gh-lwilby merged 1 commit intodevelopfrom Oct 1, 2025
Merged
[AdvancedLayouts] Modernize width and height for st.area_chart and st.bar_chart#12672sfc-gh-lwilby merged 1 commit intodevelopfrom
sfc-gh-lwilby merged 1 commit intodevelopfrom
Conversation
Contributor
✅ PR preview is ready!
|
Contributor
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
sfc-gh-bnisco
approved these changes
Oct 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Modernizes
st.area_chartandst.bar_chartto use the newHeightandWidthtype systems ("stretch","content", or pixel values) for consistency with other chart elements.Also begins deprecation of
use_container_width, which will be removed after 12-31-2025. When explicitly set,use_container_width=Truemaps towidth="stretch"anduse_container_width=Falsemaps towidth="content".Changes Made:
width:int | None = None→Width = "stretch"height:int | None = None→Height = "content"use_container_width:bool = True→bool | None = None(deprecated)use_container_widthbehavior still work with deprecation warningsLayoutConfig(width=width, height=height)for consistent layout handlingGitHub Issue Link (if applicable)
N/A
Testing Plan
use_container_widthdeprecation warningswidth/heightvalues ("content", "stretch", pixel values)Additional Notes:
Part of the broader AdvancedLayouts initiative to provide consistent width and height APIs across all chart elements.
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.