vis.js minimize crossed edges

I'm new to JavaScript and using vis.js for making a hierarchical ("UD") network. I have a problem: many edges on the same level cross.

Is there a way in vis.js to minimize crossed edges? In my example where I have a simple tree, there should no crossed edges at all.

I.e. I want something like enter image description here instead of enter image description here

My question is related to vis.js Level sorting in 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
};

Answers:

Answer

Please try an older version of vis.js: a number of people report that using 4.18.1 fixed an issue with bad order in hierarchical layout for them (though, they are having troubles with layout that doesn't have these horizontal links). If it helps, please report back to the thread (downgrading is not a nice workaround anyway).

PS there's another question where they report that the problem took place after 4.19.1 ? 4.20.0 upgrade.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.