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

LegendThreshold: Domain starting with a 1 returns undefined color #1828

Closed
ZachBarbre opened this issue May 9, 2024 · 3 comments
Closed

Comments

@ZachBarbre
Copy link
Contributor

Hi y'all,

I found in <LegendThreshold /> that if you have the domain array of scaleThreshold start with a 1 the "Less than 1" rect doesn't color correctly. While testing it I also found that if you have only two negative items in the domain array you can end up with the same color in the middle legend item and the "more than" legend item.

You can see it in action here: https://codesandbox.io/p/sandbox/determined-sanne-4j7x4y?file=%2Fsrc%2FApp.js%3A11%2C20

I have a fix if you would like me to make a PR on it.

@hshoff
Copy link
Member

hshoff commented May 9, 2024

Hi @ZachBarbre thanks for reporting this bug. Happy to review a PR

@ZachBarbre
Copy link
Contributor Author

@hshoff Awesome. Thank you. PR is up.

@hshoff hshoff closed this as completed May 20, 2024
@hshoff
Copy link
Member

hshoff commented May 20, 2024

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

No branches or pull requests

2 participants