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

.ticks behavior on axis created from scaleBands scale #35

Closed
AlexanderEllis opened this issue Apr 4, 2017 · 0 comments
Closed

.ticks behavior on axis created from scaleBands scale #35

AlexanderEllis opened this issue Apr 4, 2017 · 0 comments

Comments

@AlexanderEllis
Copy link

I noticed that the suggested count argument for the number of ticks for the .ticks() method does not change the tick behavior when called on an axis created from a scaleBands scale. I think this makes sense, but it may be helpful to mention this in the documentation.

I found this issue when graphing a bar chart with many dates along the X axis. The dates would overlap, and .ticks() was not changing the result. I see that the tickValues are assigned to the scale's domain here when the scale has no ticks function, which makes sense why I was not seeing any changes when providing an argument to .ticks().

I was able to find this post where a solution is directly assigning tickValues based off a filtered scale domain, which helped me.

The docs are currently as follows:

. . . most commonly, the arguments are a suggested count for the number of ticks (or a time interval for time scales) . . .

This makes perfect sense, but it may be helpful to include the behavior for other scales as well. Would it be worthwhile to mention the behavior of the ticks method for scaleBands scales and any other outliers?

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

No branches or pull requests

1 participant