Closed ZachBarbre closed 4 months ago
Hi @ZachBarbre thanks for reporting this bug. Happy to review a PR
@hshoff Awesome. Thank you. PR is up.
Confirmed fixed with @visx/legend@3.10.3
before: https://codesandbox.io/p/sandbox/determined-sanne-4j7x4y?file=%2Fsrc%2FApp.js%3A11%2C20 after: https://codesandbox.io/p/sandbox/determined-sanne-forked-k8zkm8?file=%2Fpackage.json%3A12%2C5-12%2C29
before | after |
---|---|
Hi y'all,
I found in
<LegendThreshold />
that if you have the domain array ofscaleThreshold
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.