Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Hierarchical network exploding #1735

Closed
Menighin opened this issue Mar 17, 2016 · 6 comments
Closed

Hierarchical network exploding #1735

Menighin opened this issue Mar 17, 2016 · 6 comments

Comments

@Menighin
Copy link

Menighin commented Mar 17, 2016

Hi there,

Im having an issue representating an hierarchical network in which there is some nodes with a lot of edges. The graph simply explodes, stretching itself to a thin grey line in my screen and then its physics starts to pull it back together. Is there any configuration or anything I could do to make it better?

I made a JSFiddle with an example. You can't really see anything there, but if you remove some edges (actually quite a lot) you can see how the graph should look like.

One interesting thing is this specific scenario use to build right in the version 4.14.0 but now in 4.15.1 it explodes. Simply keeping using the 4.14.0 version won't solve my problem because there is another scenarios in which the 4.14.0 version doesn't work but the 4.15.1 does.

Thanks in advance.

@MartinUbl
Copy link

Hi, I'm experiencing the same issue in my project - hierarchical layout with bigger amount of edges, additionally user-defined node levels (i need to be sure, that specific nodes are on level 0), explodes to one thin line.

I tried messing with various settings, but without any result. I can reproduce this issue on 4.11.0 and higher. Reverting my project to use 4.10.0 is not possible due to need of having 4.11+ features.

Thank you.

@albertolacework
Copy link

#1804 #1813 I've narrowed it down to the algorithm for getBranchBoundary being completely bonkers. As an aside commenting out this._generateMap() fixed this issue but obviously doesn't split the trees so its kinda messy.

@wimrijnders
Copy link
Contributor

There are quite a few issues reporting this problem. I'm using current issue as the central location for addressing it.

For other duplicates, see the issues referencing current in this list.

@wimrijnders
Copy link
Contributor

wimrijnders commented Apr 26, 2017

Notes on 'exploding networks'
for future reference

  • Positioning after initial positioning of non-hierarchical network is way too spread out.
  • Strict hierarchical network works.
  • There is a critical limit for number of nodes; network looks ok, adding just one node makes it explode.
  • layout.hierarchical.sortMethod: 'hubsize' works better.
  • Setting options.layout.hierarchical.edgeMinimization : false often helps alleviating the problem. For hubsize, this resolves issue completely.
  • Problem narrowed down to LayoutEngine._validataPositionAndContinue(). Disabling this removes the problem.
  • Tip: By increasing the options physics.maxVelocity, the graph can be made to converge much faster.

@wimrijnders
Copy link
Contributor

wimrijnders commented Apr 27, 2017

The problem is in method LayoutEngine._validatePositionAndContinue(). By the looks of it, the method assumes a strict hierarchy, in which child nodes have only one parent.

By disabling the method, a decent network is shown for multiple parents as well.

@wimrijnders
Copy link
Contributor

wimrijnders commented Apr 28, 2017

I am working on a solution; however, I have come to realize that layout.hierarchical.sortMethod: 'hubsize' suffers from the same/similar problem. Till now, I thought the problem was limited to directed only.

I'll try to add a fix for hubsize as well before submitting the PR.

Update: Issues with hubsize can be avoided by choosing layout.hierarchical.edgeMinimization: false (also in list above). I will leave it at that and suggest this as a workaround.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants