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
axis transition with ordinal scale broken since 3.3.4 #1535
Comments
The problem can be reproduced with this minimal example: http://jsfiddle.net/Xmdg4/1/ |
Thanks for the report. I think the axis is actually doing the right thing here, and the bug is in the behavior of the ordinal scale. I filed #1536 to track that. |
mbostock
added a commit
that referenced
this issue
Sep 21, 2013
When an ordinal scale’s range is explicitly defined as an array of values, we can build the domain implicitly by progressively assigning values from the range; this is commonly done with color palettes, for example. However, when an ordinal scale’s range is rather implied by chopping a continuous range into a series of points or bands, then the domain must be specified explicitly: for the scale to be consistent, we need to know the cardinality of the domain to compute the implied range values. Thus, it only makes sense to extend the domain implicitly when the range is specified explicitly. Fixes #1536 #1535.
Great, thanks for the quick fix, Mike! |
Fixed in 3.3.5. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This problem occurs since updating from 3.3.3 to 3.3.4, and probably has something to do with 06e2077.
I have a graph with an ordinal x-axis to which the user can add and remove items. Since the update to 3.3.4, after removing an item (and updating the domain to reflect this), the position of the ticks and labels on the x-axis don't update. However, the value of the labels and the position of the datapoints on the graph are updated correctly.
relevant code:
on update:
Quite possibly this caused by me relying on something I shouldn't be relying on, but I can't figure out what's wrong.
The text was updated successfully, but these errors were encountered: