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

Allow links that span columns to be routed away from other nodes #25

Open
tomshanley opened this issue Jun 17, 2018 · 2 comments
Open
Assignees

Comments

@tomshanley
Copy link
Owner

Currently, non-circular links that connect nodes which aren't in consecutive columns sometimes overlap other nodes which are in between. While the current functions tries to shift the overlapping nodes out of the way, its not always optimal and causes the layouts the be erratic when slightly changing other parameters.

@tomshanley
Copy link
Owner Author

Provide users with an option to route links away from other nodes that are in between the source and target

@tomshanley
Copy link
Owner Author

https://github.com/ricklupton/d3-sankey-diagram/ uses the concept of dummy nodes, which could provide a solution, in that these could be used when creating the links, as the layout is strong on preventing node overlaps in the same column

Example process:

  1. identify non-circular links that span more than 1 columns
  2. for each intermediary column
  • create placeholder node(s)
    • identify it as a placeholder
  • create link from source to node
    • identify it as a placeholder
      [- create link from node to node]
    • identify it as a placeholder
  • create link from node to target
    • identify it as a placeholder
  • delete original link
  1. layout
  • err placeholder nodes for same link to be in line
  1. create the original link, using placeholder links to create path data for original link
  2. delete placeholder links
  3. delete placeholder nodes

@tomshanley tomshanley self-assigned this Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant