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

Support for negative values for VerticalBarChart #30164

Closed

Conversation

Shubhabrata08
Copy link
Contributor

@Shubhabrata08 Shubhabrata08 commented Dec 26, 2023

Previous Behavior

VerticalBarChart renders wrongly in case of negative y values.
image

New Behavior

Negative value support added for VerticalBarChart
image
image

This PR brings the following logic changes:

  1. In case of presence of both negative and positive y values, equidistant scaling on either sides is maintained as [-maxAbsoluteYVal,+maxAbsoluteVal]
  2. In order to have y=0 line show up as anchor points, odd tick counts are auto incremented by 1.
  3. The changes will show up only on using supportNegativeValues flag in VerticalBarChart props

Related Issue(s)

Copy link

codesandbox-ci bot commented Dec 26, 2023

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.

Latest deployment of this branch, based on commit c3bf77b:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@AtishayMsft
Copy link
Contributor

This representation is a bit confusing. We need to show the y=0 axis line here.
And put all the changes behind a flag to ensure no regressions.

@krkshitij
Copy link
Contributor

@srmukher Some ids do not match in the snapshots resulting in build failure, but this is not happening on the local machine. Could you please help resolve this issue?

@AtishayMsft
Copy link
Contributor

Could you share a screenshot after the latest changes.

@Shubhabrata08
Copy link
Contributor Author

Shubhabrata08 commented Dec 28, 2023

Sure @AtishayMsft ,
image

@Shubhabrata08 Shubhabrata08 marked this pull request as ready for review December 28, 2023 15:45
@Shubhabrata08 Shubhabrata08 requested a review from a team as a code owner December 28, 2023 15:45
@AtishayMsft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@fabricteam
Copy link
Collaborator

📊 Bundle size report

🤖 This report was generated against 2a42b52a62aa5bc6e2c0fb81e43d4edf0b0fc4e9

@fabricteam
Copy link
Collaborator

🕵 fluentuiv8 No visual regressions between this PR and main

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: 2a42b52a62aa5bc6e2c0fb81e43d4edf0b0fc4e9 (build)

@layershifter
Copy link
Member

Closing for housekeeping 🏡 Feel free to re-open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants