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

Bug: Bars with zero value are not able to render labels #2646

Open
tigerabrodi opened this issue Sep 9, 2024 · 0 comments
Open

Bug: Bars with zero value are not able to render labels #2646

tigerabrodi opened this issue Sep 9, 2024 · 0 comments

Comments

@tigerabrodi
Copy link

Please 🫠 , don't close this issue like done with #2172.

It seems like the issue in #874 is back. I am unable to render a zero above the bar when it's value is 0. The fields with value 0 get excluded completely. I'd assume something like !{the value} is done in the source which means if the value is the number 0, the expression !0 results in true.

What do I expect?

Explicitly check if undefined, otherwise if the value number 0, it should be totally fine to include the field!

Looking in the source code, the function filterZerosIfLog in the file packages/bar/src/compute/stacked.ts seems suspicious. But I'd need to take a deeper look to properly fix this.

Pinging people who had this issue in the past, and it doesn't seem to be resolved yet, or it's back!

cc @RobertHosking @dooleyb1

@tigerabrodi tigerabrodi changed the title Bars with zero value are not able to render labels Bug: Bars with zero value are not able to render labels Sep 9, 2024
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

No branches or pull requests

1 participant