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

A layout bug with no clue of reasons #2297

Closed
qubotong opened this issue Nov 10, 2016 · 6 comments
Closed

A layout bug with no clue of reasons #2297

qubotong opened this issue Nov 10, 2016 · 6 comments

Comments

@qubotong
Copy link

image

As the img above shows, some nodes are distributed very far away from others in horizontal. Any body know the reason of this sick layout?

I have a really complicated tree structure data, each node can has multiple parents and multiple children, and the image above only show few of the edges. If I include all edges, the results will be just a line and when I zoom in, all results are gone as following image shows.

image

My option setting as follows:
layout: {
hierarchical: {
enabled:true,
levelSeparation: 250,
treeSpacing:10,
nodeSpacing:150,
direction: "DU",
sortMethod: 'directed'
}
},

@qubotong
Copy link
Author

@mojoaxel
Copy link
Member

Here is the codes of the problem example in my github:

Here is the running example: http://jsbin.com/bavojuy/1/edit?output

@qubotong
Copy link
Author

@mojoaxel thanks, any idea of the reasons of this?

@mojoaxel
Copy link
Member

mojoaxel commented Nov 13, 2016

thanks, any idea of the reasons of this?

No, layouts are quite complicated.
You could try increasing the levelSeparation thats brings the Network more "together".

I'll played around with your data and stumbled over multiple issues. I simply have not the time to get into the network layouting. Maybe we can find the problems over time and create simple demos to isolate them.

@mojoaxel mojoaxel added this to the Major Release v5 milestone Feb 16, 2017
@wimrijnders
Copy link
Contributor

From the jsbin:

There are two problems:
(1) some nodes are distributed to very far away from others.
(2) if uncomments all edges, then the zoom in will lead to no results at all.

The issues are fixed by pending PR #3017. The resulting network now looks like this:

download

This is much more structured and compact. But I'll admit I miss the elegant curves of the original a bit.

@wimrijnders
Copy link
Contributor

Closing, duplicate of #1735.

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

3 participants