Skip to content
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

[Enhancement]: Allow repeating name in different categories in Alluvial charts #1822

Open
gmanrique-cb opened this issue May 15, 2024 · 0 comments

Comments

@gmanrique-cb
Copy link

gmanrique-cb commented May 15, 2024

Summary

The current implementation doesn't allow repeated names across categories in Alluvial charts. If I do that I get a "circular link" error thrown by the d3-sankey lib. I dig a bit in the code and I think it's because the name is being used as the nodeId but I'm providing repeated names in different nodes, which causes ids not to be unique.

Justification

Let's say we asked some users to sort a list of three colors by their preference, and we want to represent that as flows using an Alluvial chart. Something like this:

image

Note: totally made up numbers that don't make any sense

I was able to make it work by including the category names (First, Second, Third) as part of the node names to make them unique.

Sandbox

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

No branches or pull requests

1 participant