-
Notifications
You must be signed in to change notification settings - Fork 295
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
Enable the use of d3.join() without implicit d3.order() call #299
Comments
ordering is not an implicit byproduct of selection.join, but an explicit part of the feature as mentioned in the documentation and in the unit test: 146af5d Have you considered applying selection.sort after the join()? |
Yes, I read the documentation (after searching for quite some time why the z-ordering problem occurs - first I assumed some problem with my But I do no think that ordering (in I think there are use cases where it is not desired that Otherwise, methods such as |
selection.join is a convenience function. If you don’t want to order, you should call the underlying methods directly yourself. We shouldn’t add options to selection.join. |
I switched one of my applications from the "old"
enter()
/merge()
pattern to use the "new"join()
method.I really like how concise data binding becomes using this method.
Sadly, only after this move I found out that
join()
automatically performsorder()
after the merge of the enter and update selection.Possible improvement: Since my application relies on preserving the document order, and data array reordering is not really feasable in my case, I would like to ask whether it is possible to add an additional (optional) parameter to the
join()
method that allows users to specify whether they want to automatically performorder()
at the end of the join method. Probably somethink like anoptions
parameter.An example for this problem can be found here: https://stackoverflow.com/q/71179024/2938364
The problematic line is
d3-selection/src/selection/join.js
Line 14 in 91245ee
The text was updated successfully, but these errors were encountered: