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

Align links of same label in Sankey diagrams #3568

Open
harisbal opened this issue Feb 22, 2019 · 8 comments
Open

Align links of same label in Sankey diagrams #3568

harisbal opened this issue Feb 22, 2019 · 8 comments
Labels
feature something new P3 not needed for current cycle

Comments

@harisbal
Copy link

harisbal commented Feb 22, 2019

Hello, sometimes links with the same label (i.e. type) may stretch across multiple levels of a sankey diagram.
For instance in the following picture the links in red have the same label: inkedsankey-align_li
I don't believe that there is any option at the moment to align these links so that they become continuous right?

Cheers

@antoinerg
Copy link
Contributor

Hello @harisbal and thank you for your interest in plotly.js!

Unfortunately, aligning links so they become continuous is not supported right now. To be honest with you, I won't have time to implement this in the very near future because there are other very important features that are much easier to implement.

To realize the feature you're asking, we would have to break links into smaller ones. For example, if a node only has two outgoing links, a given link can only be at the top or the bottom which may not produce a continuous alignment. To position it anywhere in the middle, we would have to split the other link into two to make a sandwich. This is not a feature/scenario that was considered when designing the Sankey layout generators.

I agree this feature would be useful however and I will keep it in mind when improving our layout generator :)

@antoinerg antoinerg added the feature something new label Feb 22, 2019
@harisbal
Copy link
Author

Hi @antoinerg and thank you for the quick reply. I understand the implications, I just wanted to suggest it as a possible future feature.
Cheers!

@alexcjohnson
Copy link
Collaborator

@harisbal Have you seen the parcats trace type? https://plot.ly/python/parallel-categories-diagram/ It's a fairly new one #2963 that's in some ways a combination of parcoords and sankey, and does preserve alignment all the way across.

@harisbal
Copy link
Author

@alexcjohnson this indeed seems very promising and probably is very similar to what I'm looking for.
Thanks for the suggestion!

@harisbal
Copy link
Author

harisbal commented Feb 27, 2019

@harisbal Have you seen the parcats trace type? https://plot.ly/python/parallel-categories-diagram/ It's a fairly new one #2963 that's in some ways a combination of parcoords and sankey, and does preserve alignment all the way across.

Hi @alexcjohnson
Parallel categories are indeed very useful but have a "limitation" that all paths have to stretch from beginning to end. I explain. In the following picture
screenshot_1
the nodes without titles should be deleted.
Do you think that there is any solution to that. I was thinking to create a patch that deletes the non-required links although it would be a very "dirty"approach.

@Kmysiak
Copy link

Kmysiak commented Dec 14, 2021

@harisbal Have you seen the parcats trace type? https://plot.ly/python/parallel-categories-diagram/ It's a fairly new one #2963 that's in some ways a combination of parcoords and sankey, and does preserve alignment all the way across.

Hi @alexcjohnson Parallel categories are indeed very useful but have a "limitation" that all paths have to stretch from beginning to end. I explain. In the following picture screenshot_1 the nodes without titles should be deleted. Do you think that there is any solution to that. I was thinking to create a patch that deletes the non-required links although it would be a very "dirty"approach.

I'm assuming that the links going into 2 and 3 are NULLS in the data. I wonder if there is a way to "hide" these links and nodes using color.

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

@joshhopkins
Copy link

joshhopkins commented Aug 15, 2024

@antoinerg is this feature now available? If not, I suggest this issue be reopened as there is some useful context here. @alexcjohnson parallel categories do not allow cycles, so unfortunately doesn't solve this issue.

@gvwilson gvwilson added the P3 not needed for current cycle label Aug 15, 2024
@gvwilson gvwilson reopened this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 not needed for current cycle
Projects
None yet
Development

No branches or pull requests

6 participants