1
我有一個vis.js網絡圖,其中包含多個節點之間的邊,我也嘗試使用分層佈局來設置它。如果我做一個沒有分層佈局選項的正常圖形,那麼節點之間會顯示多條線,但是,一旦我打開/放置在分層佈局選項中,只繪製一條線。[visjs]中節點和分層佈局之間的多條線
下面是兩個plunkers顯示我的意思:
https://plnkr.co/edit/c8SuBc0XjDZnn6im2vdg(Plunker與分層佈局關閉)
var options = {
height: '400px',
edges: { smooth: true, shadow: true},
layout: {
randomSeed: 1,
improvedLayout: true,
hierarchical: {
enabled: false, //change to true to see the other graph
direction: 'UD',
sortMethod: 'directed'
}
}
}
https://plnkr.co/edit/L22bHk6kh1XKXulTjESD(Plunker與分層佈局)
var options = {
height: '400px',
edges: { smooth: true, shadow: true},
layout: {
randomSeed: 1,
improvedLayout: true,
hierarchical: {
enabled: true, //change to true to see the other graph
direction: 'UD',
sortMethod: 'directed'
}
}
}
任何幫助將很棒。
是從A-> B有多個邊的目的? –
@John是的,節點之間有多條邊。 –
從我最近找到的庫中添加更多支持。 https://github.com/almende/vis/issues/2957和https://github.com/almende/vis/issues/1957。 –