0
我正在使用vis.js @version 4.10.0。我有要求在邊緣選擇期間需要找到節點的位置。vis.js selectEdge並識別節點
我正在使用下面的代碼來生成圖。
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var directionInput = "UD";
var options = {
layout:{randomSeed:6,improvedLayout:true},
nodes: {
shape: 'circle',
shadow:true,width: 2,
size: 10,
"color": {
"background": "lightblue",
"border": "lightblue",
"highlight": "yellow"
},
edges:{
shadow: true,
arrows: 'to, from',
color: 'red',
font: '12px arial #ff0000',
scaling:{
label: true,
}
},
physics:{
stabilization: true
},
scaling:{
label: {
min:12,
max:26
}
}
}
};
network = new vis.Network(container, data, options);