Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2:1 spacing in vertical bar charts with string x-axis #30192

Merged
merged 22 commits into from
Mar 1, 2024

Conversation

krkshitij
Copy link
Contributor

@krkshitij krkshitij commented Jan 2, 2024

For more information, see RFC: Fix 2:1 spacing

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 2, 2024

📊 Bundle size report

🤖 This report was generated against b1f669dceb6855bdd01d9e7be7764687aa161cf5

Copy link

codesandbox-ci bot commented Jan 2, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

size-auditor bot commented Jan 3, 2024

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 99e1128925fa5863a99e311884cc2c710c2606bd (build)

@krkshitij krkshitij changed the title Fix 2:1 spacing Fix 2:1 spacing in vertical bar charts with string x-axis Feb 11, 2024
@krkshitij krkshitij marked this pull request as ready for review February 11, 2024 16:27
@krkshitij krkshitij requested a review from a team as a code owner February 11, 2024 16:27
@AtishayMsft
Copy link
Contributor

Can we keep the existing functionality as default behavior if the user does not use the new props.

@krkshitij
Copy link
Contributor Author

@AtishayMsft To keep the existing functionality as default behavior, we will have to make following changes:

  • We will have to set the default bar width to 16px. Users will need to explicitly specify 'undefined' as the bar width to make it update automatically according to padding values.
  • While the default inner padding will remain at 2/3 to maintain 2:1 spacing between bars, we will have to increase the default outer padding to center align the 16px bars. However, as padding is a fraction of the step, it can only be increased up to a certain limit making it difficult to maintain 2:1 spacing with 16px bars across different chart widths. To address this, we will have to calculate the extra padding required around the bars (domainMargin), as done previously.

@krkshitij krkshitij requested a review from a team as a code owner February 29, 2024 13:06
@AtishayMsft
Copy link
Contributor

On editing the inner padding and outer padding input fields, if I set them as empty the chart piles up on the left side.

image

@AtishayMsft
Copy link
Contributor

On editing the inner padding and outer padding input fields, if I set them as empty the chart piles up on the left side.

image

make the inner padding and outer padding input fields as a slider from 0 to 1

@AtishayMsft
Copy link
Contributor

Another bug: On selecting the xAxisOuterPadding field, the bar labels are disappearing.

@krkshitij krkshitij merged commit 5fa09dd into microsoft:master Mar 1, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants