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

Fix autoscale of linechart when data have holes. #1729

Merged
merged 2 commits into from
Aug 28, 2021
Merged

Fix autoscale of linechart when data have holes. #1729

merged 2 commits into from
Aug 28, 2021

Conversation

PierrVanRoy
Copy link
Contributor

The yScale.auto option is not properly computed when the data have holes and is positive.

This PR filters those hole from the values of the chart so tat the min is not always 0 in that case.

Before:
image

After:
image

Reported also by: #859

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 23, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2fd9524:

Sandbox Source
nivo Configuration
nivo-website Configuration

packages/scales/src/compute.ts Outdated Show resolved Hide resolved
@plouc
Copy link
Owner

plouc commented Aug 23, 2021

@PierrVanRoy, thank you for this fix, nice UI btw :) Is that a public project?

@PierrVanRoy
Copy link
Contributor Author

@plouc , we are using Nivo quite a lot at Pigment but sadly I have no public access to share with you :-( .
BTW, thanks a lot for this project. It's a real pleasure to use it!

Copy link
Owner

@plouc plouc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@plouc plouc merged commit 1c41268 into plouc:master Aug 28, 2021
@PierrVanRoy PierrVanRoy deleted the pvr/fix-autoscalewithhole branch August 29, 2021 18:17
@PierrVanRoy
Copy link
Contributor Author

hello @plouc,

Do you have any visibility on when this fix will be include a nivo release? 🙏
Just want to know if we should patch on our side or if we ca wait for an official release.

Thanks

Pierre

@plouc
Copy link
Owner

plouc commented Sep 28, 2021

@PierrVanRoy, unfortunately, I'm pretty busy with work and personal matters at the moment, so it's unlikely that I'll release the fix soon.

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.

2 participants