Vis.js minimizes crossed edges

I am new to JavaScript and use vis.js to create a hierarchical ("UD") network. I have a problem: many ribs on the same level.

Is there a way in vis.js to minimize crossed edges? In my example, where I have a simple tree, there should not be any crossed edges.

those. I want something like enter image description hereinsteadenter image description here

My question is related to vis.js Sorting levels in a hierarchical layout

Here are my vis.js options:

var options = {
    edges: {
        smooth: {
            type: 'cubicBezier',
            roundness: 0.4
        }
    },
    layout: {
		improvedLayout: true,
        hierarchical: {
            direction: "UD"
        }
    },
    physics:false
};
Run codeHide result
+4
source share
1 answer

vis.js: , 4.18.1 ( , ). , , ( ).

PS , , 4.19.1 → 4.20.0.

0

Source: https://habr.com/ru/post/1685871/


All Articles