Skip to content

feat: allow fixing the vertical order of Sankey nodes#7873

Draft
adamreeve wants to merge 5 commits into
plotly:v4.0from
adamreeve:sankey-order
Draft

feat: allow fixing the vertical order of Sankey nodes#7873
adamreeve wants to merge 5 commits into
plotly:v4.0from
adamreeve:sankey-order

Conversation

@adamreeve

Copy link
Copy Markdown
Contributor

Fixes #4373

This exposes the nodeSort method added to d3-sankey, to allow disabling the default ordering algorithm and enforcing that the vertical order should match the order of nodes in the input data.

Note that the nodeSort method in d3-sankey can be a method that compared two nodes (see the docs), but for many users I think just providing a way to pass null instead of the default undefined is sufficient. But maybe this could be future-proofed somehow to support using a comparison method in future?

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.

1 participant