vis.js最小化交叉边缘 [英] vis.js minimize crossed edges

查看:169
本文介绍了vis.js最小化交叉边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JavaScript新手,并使用vis.js创建分层(UD)网络。我有一个问题:同一级别上的许多边交叉。

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.

vis.js中是否有一种方法可以最小化交叉边缘?在我的例子中,我有一个简单的树,根本不应该有交叉边。

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.e. I want something like instead of

我的问题与层次布局中的vis.js级别排序

以下是我的vis.js选项:

Here are my vis.js options:

var options = {
    edges: {
        smooth: {
            type: 'cubicBezier',
            roundness: 0.4
        }
    },
    layout: {
		improvedLayout: true,
        hierarchical: {
            direction: "UD"
        }
    },
    physics:false
};

推荐答案

请尝试旧版本的vis.js:一些人报告使用4.18.1修复了分层布局中的错误顺序问题(但是,他们遇到了没有这些水平链接的布局问题)。如果它有帮助,请向线程报告(降级不是一个很好的解决方法)。

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有另一个问题,他们报告问题发生在4.19.1→4.20.0升级之后。

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

这篇关于vis.js最小化交叉边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆