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

tickCount not working #66

Closed
brandonchoe opened this issue Oct 3, 2017 · 7 comments
Closed

tickCount not working #66

brandonchoe opened this issue Oct 3, 2017 · 7 comments

Comments

@brandonchoe
Copy link

I am unable to get tickCount to work (mentioned in #57). tickValues does work, but tickCount doesn't do anything. I am using nivo@0.29.4.

@plouc
Copy link
Owner

plouc commented Oct 4, 2017

Can you provide more context please? If you look at this example, you can see it working.

@plouc
Copy link
Owner

plouc commented Oct 10, 2017

@brandonchoe I close this issue as it works on the provided example and I got no feedback from you, let me know if you still experience issue with this and can provide context.

@plouc plouc closed this as completed Oct 10, 2017
@mjsarfatti
Copy link
Contributor

mjsarfatti commented Sep 3, 2018

I would like to re-open the issue because tickCount is still not working.
in nivo/packages/core/src/lib/cartesian/axes.js, line 81-82 we have:

   const tickValues = isArray(_tickValues) ? _tickValues : undefined
   const tickCount = isNumber(_tickValues) ? _tickValues : undefined

Which means that the property tickCount is ignored, but if the property tickValues is a number instead of an array, it will be treated as tickCount.

Eg. setting tickValues: 2 will draw only the '0' and the highest tick value.

@plouc
Copy link
Owner

plouc commented Sep 3, 2018

tickCount has been removed in favor of a more versatile tickValues, to avoid having several properties to handle the same functionality, it works as described here.

@plouc
Copy link
Owner

plouc commented Sep 3, 2018

See d3/d3-array#61 for tick count.

@mjsarfatti
Copy link
Contributor

Right, somehow I had missed that, sorry!

@plouc
Copy link
Owner

plouc commented Sep 3, 2018

No problem, it changed recently :)

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

No branches or pull requests

3 participants