Skip to content

Conversation

@mbostock
Copy link
Member

@mbostock mbostock commented Dec 23, 2023

Fixes #1678. If we simply don’t sort the groups naturally by key, then the groups will be in input order and hence the sort option will generally work as expected.

I’ll need to fix a number of the tests that relied on the implicit sort. Done.

@mbostock mbostock requested a review from Fil December 23, 2023 17:54
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably use multiply blending so the appearance is not affected by order, but that makes it unacceptably slow. 😞

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could switch to computing the end color directly? challenge unrelated to this PR though :)

@mbostock mbostock marked this pull request as ready for review December 23, 2023 19:07
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could switch to computing the end color directly? challenge unrelated to this PR though :)

@mbostock mbostock merged commit b5366f9 into main Dec 27, 2023
@mbostock mbostock deleted the mbostock/group-input-order branch December 27, 2023 19:24
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* preserve group input order

* sort: "z"; fix tests

* reduce z docs

* fix tests

* Update docs/transforms/group.md

Co-authored-by: Philippe Rivière <[email protected]>

---------

Co-authored-by: Philippe Rivière <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The group transform always sorts groups naturally; should this be configurable?

3 participants