-
Notifications
You must be signed in to change notification settings - Fork 46
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
API or documentation for scale nicing #40
Comments
Hey @fin absolutely, if you have a way of making d4 better which doesn't break anything in terms of backward compatibility I am all for it. My feeling is that this should probably be an accessor, there are several examples of how to do this in other features. Also you will probably want to checkout https://github.com/heavysixer/d4-www to run your changes against the examples directory. If you have both projects checked out side by side it's designed to copy over your development version of d4 into the example site so that you can ensure you are not breaking anything. Thanks again for the interest in D4 |
hey, do you have a minute to shed some light on this? |
Hi @fin is there a branch i can pull to see what's going on? I think i'll need to be able to reproduce the error before i can help. |
i pushed a clean commit, the diff to your master will be slightly more involved since grunt seems to re-format sourcefiles as well, but those are the only functional changes: figured it would be enough to override the proxy's .domain function to call .nice after its values were set, but the proxy seems to not be accessed by the builders. |
@fin awesome, let me pull and see if I can suss out what is going on. Thanks for taking a stab at it. |
working on this now... |
Hey @fin just to make sure I understand what you are after checkout this codepin: You'll see you can adjust |
i'm trying to move the .nice into the declaration of the chart. in your example, the chart is coupled to the data doubly: in the declaration, and through the .datum().call() function. what i would have wanted to achieve is to have a setting on the axis, saying "should the axis' scale be niced? (y/n/[integer value like d3.time.day])" so that the chart can be defined independently from the data, and there's only one data ingress point: the .datum().call() pattern. |
Forgive me if I am still not understanding you, but I think we are agreed that we don't want to |
The fix to #32 disabled auto-nicing. The (undocumented) way of nicing scales I found is:
I'd appreciate if this could be done declaratively, like setting the Key for the Axis.
Should I take the time to implement this and send a pull request, or should I just add the workaround to the documentation?
The text was updated successfully, but these errors were encountered: