GIT-450: feat(BarChart): expose bar size and gap props#454
Open
osk02 wants to merge 1 commit into
Open
Conversation
Recharts' BarChart and Bar components accept four standard props for controlling bar width and spacing — maxBarSize, barSize, barCategoryGap, and barGap. The Force UI wrapper currently swallows all of them, so consumers cannot cap or shrink bar widths without forking the wrapper. This forwards them through: - barCategoryGap and barGap go onto the inner <BarChart> - maxBarSize and barSize go onto each <Bar> All four props are optional. When unset, Recharts' default sizing applies, so existing behavior is preserved for current consumers.
2 tasks
ee4321b to
4a51ab3
Compare
4a51ab3 to
ee4321b
Compare
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.
Summary
Re-raises PR #450 with a clean history.
Recharts'
BarChartandBarcomponents accept four standard props for controlling bar width and spacing —maxBarSize,barSize,barCategoryGap, andbarGap. The Force UI wrapper currently swallows all of them, so consumers cannot cap or shrink bar widths without forking the wrapper.This forwards them through:
barCategoryGapandbarGapgo onto the inner<BarChart>maxBarSizeandbarSizego onto each<Bar>All four props are optional. When unset, Recharts' default sizing applies, so existing behavior is preserved for current consumers.
Test plan
barSize={20}→ bars render at 20px widthmaxBarSize={40}on a category with few bars → bars cap at 40pxbarCategoryGap="20%"andbarGap={4}→ spacing reflects values