Skip to content

Fix circle meter angle calculation for large values #6293

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

Merged
merged 2 commits into from
Aug 23, 2022

Conversation

MikeKingdom
Copy link
Collaborator

What does this PR do?

This fixes an issue where large data values for a circle style <Meter> cause no segments to be drawn (typically values in the 10000+ range)

Where should the reviewer start?

Circle.js

What testing has been done on this PR?

Manual, jest and storybook

How should this be manually tested?

See the added jest test case for an example of the problem.

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • userEvent is used in place of fireEvent.
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Fixes #6287

Screenshots (if appropriate)

image

Do the grommet docs need to be updated?

No

Should this PR be mentioned in the release notes?

Yes

Is this change backwards compatible or is it a breaking change?

Backwards compatible (fixes a regression)

@ericsoderberghp ericsoderberghp merged commit 606d0b3 into master Aug 23, 2022
@ericsoderberghp ericsoderberghp deleted the fix-meter-circle branch August 23, 2022 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Meter type="circle" doesn't always render all values
2 participants