可见网络重叠数字问题



现在我正在使用Visnetwork进行一个项目(Angular 8(,一切都很好,除了行上的数字重叠之外,我们可以在不分隔行的情况下做到这一点吗?我的意思是,我们可以改变一行上数字的位置吗?你能帮我吗。(请查看此屏幕截图(

var edges = [
{ from: 2, to: 1, color:'#FF7F50', label: "2",     arrows: "top",},
{ from: 1, to: 2, color:'#FF7F50', label: "2",     arrows: "top"},
{ from: 6, to: 5, color:'#1085E0', label: "12",    arrows: "top",},
{ from: 5, to: 6, color:'#1085E0', label: "5",     arrows: "top"},
{ from: 5, to: 5, color:'pink',    label: "5",     arrows: "top"},
{ from: 6, to: 6, color:'#1085E0', label: "5",     arrows: "top"},
{ from: 7, to: 2, color:'red'    , label: "8",     arrows: "middle"},
{ from: 4, to: 5, color:'#FF7F50', title: "Title", arrows: "to, from"},
{ from: 6, to: 7, color:'#0C7D1A', title: "Title", arrows: "middle"}
];
var edges = [
{ from: 2, to: 1, color:'#FF7F50', label: "2",     arrows: "top", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 1, to: 2, color:'#FF7F50', label: "2",     arrows: "top", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 6, to: 5, color:'#1085E0', label: "12",    arrows: "top", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 5, to: 6, color:'#1085E0', label: "5",     arrows: "top", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 5, to: 5, color:'pink',    label: "5",     arrows: "top", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 6, to: 6, color:'#1085E0', label: "5",     arrows: "top", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 7, to: 2, color:'red'    , label: "8",     arrows: "middle", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 4, to: 5, color:'#FF7F50', title: "Title", arrows: "to, from", smooth: { type: "curvedCW", roundness: 0.2 } },
{ from: 6, to: 7, color:'#0C7D1A', title: "Title", arrows: "middle", smooth: { type: "curvedCW", roundness: 0.2 } }
];

请参阅Stacklitz

最新更新