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

Support passing count as argument to xNice prop (et al.) #101

Merged
merged 4 commits into from
Oct 3, 2022

Conversation

techniq
Copy link
Contributor

@techniq techniq commented Oct 2, 2022

Resolves #99

Currently...

image

...after passing yNice={4} (which matches AxisY ticks = 4 default)

image

@techniq
Copy link
Contributor Author

techniq commented Oct 2, 2022

@mhkeller I'm never 100% sure which docs are generated and which need to be updated, so you might want to double check I didn't overlook something.

If this looks good and gets merged, could you publish as 7.1.0? Thanks.

if (typeof scale.nice === 'function') {
scale.nice();
if (typeof $nice === 'number') {
scale.nice($nice);
Copy link
Owner

Choose a reason for hiding this comment

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

Could put this as a conditional inside of the function call?

@@ -35,6 +35,7 @@
padding={{ right: 10, bottom: 20, left: 25 }}
x={xKey}
y={yKey}
yNice={4}
Copy link
Owner

Choose a reason for hiding this comment

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

Gonna add this to the SSR example too.

@mhkeller mhkeller merged commit d1d05b9 into mhkeller:main Oct 3, 2022
@techniq techniq deleted the nice-count branch February 19, 2023 16:15
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.

Pass count to nice
2 participants