Skip to content

The stack order option should support a comparator #1195

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

Closed
mbostock opened this issue Dec 21, 2022 · 2 comments · Fixed by #1642
Closed

The stack order option should support a comparator #1195

mbostock opened this issue Dec 21, 2022 · 2 comments · Fixed by #1642
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

E.g., here for sorting semantic versions

https://observablehq.com/@mbostock/npm-daily-downloads

@mbostock mbostock added the enhancement New feature or request label Dec 21, 2022
@mbostock mbostock changed the title The order option should support a comparator The stack order option should support a comparator Mar 22, 2023
@mbostock
Copy link
Member Author

We already support order being specified as a function of data, in which case it is interpreted as an accessor (passed to valueof). We could check the length of the function, though, which the sort transform does already.

@mbostock
Copy link
Member Author

mbostock commented May 26, 2023

Related #1606 #1613.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant