Skip to content

Sankey nodeAlign? #1938

Description

@dangerismycat

Curious if there are any plans to merge the more recent d3-sankey support for node alignment (from this commit, June 13 of this year) into your fork? It's a really useful feature that I'd love to be able to use with your great wrapper.

Activity

  1. etpinard commented on Aug 8, 2017

    @etpinard
    Contributor
  2. monfera commented on Aug 8, 2017

    @monfera
    Contributor

    @etpinard please tell me when to schedule it:

    Some of our PRs to upstream d3-sankey were merged by Mike Bostock, so catching up makes sense for multiple reasons. One of our PRs predictably wasn't taken up, we'll need to reapply, likely not a lot of divergence yet. The alignment options should be exposed via plotly.js attributes in the JSON.

  3. self-assigned this
    on Aug 8, 2017
  4. etpinard commented on Aug 8, 2017

    @etpinard
    Contributor

    please tell me when to schedule it:

    Definitively not a high priority for now, unless @jackparmer thinks otherwise.

  5. jackparmer commented on Aug 8, 2017

    @jackparmer
    Contributor

    Yeah, no customers on my radar who are asking about this. Probably shelve for now.

  6. phillyo commented on Mar 16, 2018

    @phillyo

    would be great to have this option! when visualizing process flows, it makes no sense that the terminal nodes are all on the right of the viz (as for those which did not pass the whole process, they should not be on the same level as all the nodes which did).

  7. harisbal commented on Jan 29, 2019

    @harisbal

    Would be a very welcome addition indeed :)
    Not being able to control the position of nodes in the sankey diagram is unfortunately a big limitation to their use

  8. antoinerg commented on Jan 29, 2019

    @antoinerg
    Contributor

    @harisbal How much control do you want to have over the position of the nodes. Would it be convenient if you could specify the x and y position of each node?

  9. harisbal commented on Jan 30, 2019

    @harisbal

    @antoinerg controlling doesn't sound like a bad idea indeed. What I was thinking though is being able to control the number of "vertical" groups if that makes sense. For instance in the following example
    sankey_nodes
    I cannot place the "International aviation" node at the same vertical level as "Electricity grid" and "District heating" (in the picture I'm dragging it manually)
    Ideally I would like to control how to group nodes (e.g. with a dictionary).
    In the very nice implementation of ricklupton https://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/More%20examples.ipynb this is called rank sets
    Thank you very much for checking on this.

  10. JeroenSchmidt commented on Mar 28, 2019

    @JeroenSchmidt

    @harisbal thank you for the link showing how to use ranksets. This is a really handy feature when one wants to order their sankey data according to a temporal layout - for example when plotting the evolution of communities that appear and disappear over time.

  11. harisbal commented on Mar 28, 2019

    @harisbal

    @JeroenSchmidt that;s exactly the issue I'm facing, where I try to depict some temporal data (often disappearing between nodes).

  12. antoinerg commented on Mar 29, 2019

    @antoinerg
    Contributor

    @JeroenSchmidt @harisbal Thank you for reminding me of the need for this worthwhile feature.

    In the meantime, PR #3583 (set to be released in 1.46.0) allows one to manually control the position of nodes either via dragging or by setting attributes node.(x|y). I am investigating providing control over the number of colums and ordering within them.

  13. gabubellon commented on May 14, 2019

    @gabubellon

    I endorse how interesting this feature would be.
    I have work with d3 / d3-sankey "vanilla" and had problems with depth that in Plotly were solved.
    However having a nodeAlign implementation for time series would help a lot.
    Mainly to align the roots (eith no target links) more effectively.

  14. evan-rash commented on May 24, 2019

    @evan-rash

    @antoinerg are there any updates on plans for specifying number of columns and ordering of nodes within those columns?

  15. ryankinsey1 commented on Jul 2, 2019

    @ryankinsey1

    I'm interested in this as well. What I would like to be able to is have 'terminal nodes' in the middle (i.e. some data flows end in the middle while other's flow through to the end and/or break down into further subgroups.)

  16. piccinnigius commented on Dec 1, 2019

    @piccinnigius

    @antoinerg any update or trick to implement this? i want to put the terminal nodes by levels (aligned to left instead to right)

    this:
    image

    instead of this:
    image

    it's bad to show this kind of things in production...
    oooooooor how can export the full sankey data with fixed positions?

    thanks so much for help!

  17. antoinerg commented on Dec 2, 2019

    @antoinerg
    Contributor

    This feature should not be hard to implement since it is supported in our dependencies. I started a branch a while ago https://github.com/plotly/plotly.js/compare/sankey2-node-align that shows what needs to be done. After resolving the conflicts, it might be good to go. I don't have the time to work on this at the moment but I can revisit later of help someone make a PR.

  18. tanvi-cota commented on Jul 10, 2020

    @tanvi-cota

    Do we have any update on this feature? Are we looking to work on this soon? This is a good feature, and already available in our dependency.

  19. nicolaskruchten commented on Jul 10, 2020

    @nicolaskruchten
    Contributor

    No one from the Plotly team is working on this at the moment but we’d be happy to accept a PR if someone wants to take Antoine’s work over the finish line :)

  20. tanvi-cota commented on Jul 11, 2020

    @tanvi-cota

    @nicolaskruchten I would love to contribute, let me see how can i get that updated.

  21. jackparmer commented on Sep 10, 2020

    @jackparmer
    Contributor

    This issue has been tagged with NEEDS SPON$OR

    A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.

    Sponsorship range: $5k-$10k

    What Sponsorship includes:

    • Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
    • Tests for this feature
    • Long-term support (continued support of this feature in the latest version of Plotly.js)
    • Documentation at plotly.com/javascript
    • Possibility of integrating this feature with Plotly Graphing Libraries (Python, R, F#, Julia, MATLAB, etc)
    • Possibility of integrating this feature with Dash
    • Feature announcement on community.plotly.com with shout out to Sponsor (or can remain anonymous)
    • Gratification of advancing the world's most downloaded, interactive scientific graphing libraries (>50M downloads across supported languages)

    Please include the link to this issue when contacting us to discuss.

  22. KaranTrivedi commented on Jan 10, 2023

    @KaranTrivedi

    Bump on this issue? \

  23. bverem commented on Mar 2, 2024

    @bverem

    Same, tutorial examples in v5.19.0 are ignoring node alignment values. x and y values for nodes appear to also be ignored (EDIT: It looks like if y=0, the values are ignored, but non-zero y works). Thank you for the help--love the Sankey option!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions