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

Overlapping compound nodes #48

Open
gverger opened this issue Jul 27, 2021 · 5 comments
Open

Overlapping compound nodes #48

gverger opened this issue Jul 27, 2021 · 5 comments
Assignees

Comments

@gverger
Copy link

gverger commented Jul 27, 2021

Hello, thanks for the work, it is very nice to have a good looking layout algorithm for our graphs 👍

Problem

I have a problem with compound nodes. When there are few of them, or few edges, fcose seems to behave correctly. However there are 2 cases where I see problems and I would like to know if it is a bug in the algorithm, or if it is not supposed to be handled:

I am working with graphs where we group nodes into compound nodes, and only inner components have edges.

  • when we fix one node's position, if we have nested nodes, it seems to layout all nodes diagonally and not care too much of the compounds.
  • when there are a certain amount of edges/nodes, it also seems to not care about our groups at all.

For the first case, here is a video of the demo at https://ivis-at-bilkent.github.io/cytoscape.js-fcose/demo/demo-constraint.html where I upload a graph:

Enregistrement.de.l.ecran.2021-07-27.a.17.28.16.mov

First I launch fcose, which seems to perform well. And then I lock the node L and run fcose: here the layout is strange: unrelated compound nodes overlap, nodes are ordered diagonally etc..

For the second case, even when not locking one node, the algorithm seems to not take compound nodes into account at all. Here is the result I get.

Capture d’écran 2021-07-27 à 18 17 46

Expectation

I would expect the compound nodes to not overlap at all.

Files

Both graphs (in json format) are available here: graphs.zip

@hasanbalci
Copy link
Contributor

@gverger Thanks for noticing us about the problems.

For the second case, handling compound overlaps in that graph is a hard issue since each compound is densely connected to each other. Compound nodes try to repel each other, but those dense edge connections doesn't allow that and try to keep nodes very close to each other. In other words, it is expected behavior for such graphs. We may think of further improvements for these kinds of graphs in the future.

For the first case, however, I would also expect a better result, since it's a relatively simple graph and there is only one constraint. I will further investigate this issue and check whether there is a bug or not.

@adrianbj
Copy link

Not sure if it helps at all, but I have noticed more issues with overlapping with the latest release. I have returned to an older version (from June 4) and it's significantly better - there is still some overlapping, but much less. Let me know if there is anything else I can provide that might help.

@yaxue1123
Copy link

@adrianbj May I ask the exact older version number with less overlapping? Thanks a lot!

@adrianbj
Copy link

adrianbj commented May 3, 2022

@yaxue1123 - sorry, not sure exactly, but I noted above June 4 so presumably it's the version after June 2 in this list: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/commits/master

@kaushikosu
Copy link

I am seeing compound nodes overlapping with other compound nodes and leaf nodes. Version: 2.1.0

image

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

5 participants