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

feat(scales): add option to clamp linear scales #1342

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

ollwenjones
Copy link
Contributor

Optional ability to tell a linear scale to clamp. use case e.g. setting bar
value below zero

fixes #1188

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 11, 2020

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 464e103:

Sandbox Source
nivo Configuration
nivo-website Configuration
@nivo/bar chart overlapping axis Issue #1188

Optional ability to tell a scale to clamp. use case e.g. setting bar
value below zero

fixes plouc#1188
@ollwenjones
Copy link
Contributor Author

Not sure there's value in committing the story added to test this, but it works:

image

@wyze wyze merged commit b5584de into plouc:master Dec 11, 2020
@wyze
Copy link
Contributor

wyze commented Dec 11, 2020

Thanks Sam!

@ollwenjones
Copy link
Contributor Author

thank you!

@seanjohnstone
Copy link

Can you please confirm that this was deployed to NPM?

I'm seeing the new clamp prop available in GitHub: https://github.com/plouc/nivo/blob/master/packages/scales/index.d.ts
But in NPM it's not available for the latest version (0.67.0): https://npm.runkit.com/@nivo/scales/index.d.ts

Apologies if I'm missing something.

@ollwenjones
Copy link
Contributor Author

@seanjohnstone I can confirm it is not in 0.67.0. This work was done after the 0.67.0 release. No firm timeline for the next release that I'm aware of.

ddavydov pushed a commit to netronixgroup/nivo that referenced this pull request Apr 8, 2021
Optional ability to tell a scale to clamp. use case e.g. setting bar
value below zero

fixes plouc#1188

Co-authored-by: Sam Jones <sam@decisions.com>
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.

Bars Overlap axis When minValue is greater than 0.
3 participants