-
Notifications
You must be signed in to change notification settings - Fork 254
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
parameterize the sorting algorithm in resolveCollisions() #45
Comments
@damil , could you provide me an example of where and how you did this? I need to sort alphabetically (A higher than B, higher than C, etc.). |
In function resolveCollisions(), like this :
|
I just ran into a situation where disabling/altering the sorting would be super useful. EDIT: seems like this pull would fix this: #53 |
You can now use sankey.nodeSort(null) to disable automatic reordering of nodes within the columns and preserve the input order. |
I'm new to d3-sankey and d3.js in general, thanks for this software, it's just amazingly powerful.
One feature is missing in sankey : the ability to customize the sorting algorithm used in resolveCollisions().
I'm building a diagram where I need vertical nodes to be sorted by name instead of "ascendingBreadth". I modified the source code by putting my own sorting function and it works like a charm; but it would be much better if the sorting function could be passed as a parameter to sankey().
The text was updated successfully, but these errors were encountered: