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

Hierarchical layout produces very "stretched" networks #2140

Closed
glampr opened this issue Oct 9, 2016 · 5 comments
Closed

Hierarchical layout produces very "stretched" networks #2140

glampr opened this issue Oct 9, 2016 · 5 comments

Comments

@glampr
Copy link

glampr commented Oct 9, 2016

By just modifying the 'nodeSpacing' options of the network, I get really different results for the network.
An example can be found in this plunker https://plnkr.co/edit/QKgaku?p=preview
Initially the network layouts fine, but try to change nodeSpacing from 250 to 260 for example, then the layout seems totally wrong.

@KunalAppensure
Copy link

Hey, I have found one solution
set hierarchical.edgeMinimization as true
or
set the combination of hierarchical.edgeMinimization and hierarchical.blockShifting to
true or false according to your choice of layout in the layout module .
It worked for me , hope it will help :) .

@mojoaxel
Copy link
Member

mojoaxel commented Dec 6, 2016

@glampr Was the answer of @KunalAppensure helpful to you? If so please close this issue.

@glampr
Copy link
Author

glampr commented Dec 6, 2016

The only way to make the second network "kind of" work, is to disable edgeMinimization and blockShifting, see this example.
https://plnkr.co/edit/Q867VY?p=preview
Seems like this is not yet fixed.

@wimrijnders wimrijnders changed the title Hierarchical layout produces very "streched" networks Hierarchical layout produces very "stretched" networks Apr 26, 2017
@wimrijnders
Copy link
Contributor

Duplicate #1735

@wimrijnders
Copy link
Contributor

I'm happy to report that this problem does not occur any more in vis.js v4.19.1. It still occurs with other option combinations, though.

I'm closing this, but will use the given data for testing and verification.

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

5 participants