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

Histogram renders incorrectly if the data is entirely zeroes and ones #118

Closed
kaiyoma opened this issue Aug 22, 2018 · 4 comments
Closed
Labels

Comments

@kaiyoma
Copy link

kaiyoma commented Aug 22, 2018

This might actually be a more general issue of calculating the domain, but I'll leave the problem statement more specific for now.

Here's a sandbox: https://codesandbox.io/s/3rqvwxo42p

Two issues:

  1. The second bin (the one containing all the ones) is missing entirely.
  2. The density for the first bin is calculated incorrectly, as can be seen in the height of the bar and the value in the tooltip.
@williaster williaster added the bug label Aug 22, 2018
@williaster
Copy link
Owner

Hey @kaiyoma, thanks for raising this issue.

This is definitely a bug, and related to #100. Will have a fix out shortly. Basically I was trimming the last bin for numeric unbinned data, which led to both errors you're seeing.

@williaster
Copy link
Owner

Fixed by #119

@kaiyoma
Copy link
Author

kaiyoma commented Aug 22, 2018

Great! Thanks a ton for jumping on this so quickly.

@williaster
Copy link
Owner

should be fixed in @data-ui/histogram@^0.0.63

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

No branches or pull requests

2 participants