我想通过可视化网络可视化关系,该工具绝对很棒。 我找不到只有一种设置。 这里有一个示例输出:
如果我用鼠标手动向左和向右一点移动框,则会得到以下结果:
基本上,我避免重叠的边缘。 如何指示vis-network渲染数据而不重叠边缘? 它不必看起来完全像我的结果,主要是重叠部分消失了。如果由于数据而无法完全避免重叠,则应将重叠的数量减至最少。
我的设置:
var options = {
"physics": {
"enabled": false,
"solver": "hierarchicalRepulsion"
},
"layout": {
"hierarchical": {
"enabled": true,
"nodeSpacing": 290,
"sortMethod": "directed",
"direction": "DU",
"shakeTowards": "leaves"
}
},
"nodes": {
"shape": "box"
},
"edges": {
"width": 3,
"smooth": {
"enabled": false,
"type": "horizontal",
"roundness": 0.5,
"forceDirection": false
}
}
};
在这里,我将其放在js小提琴中,让您自己尝试并调整选项: https://jsfiddle.net/qwpxa1cj/7
如果它不适用于可见网络设置,是否还有其他选择可以使其正常工作?例如。通过重新排序数据数组?
谁知道如何获得无重叠的结果?
许多问候, 蒂姆