即使做了我可以在Google中找到的所有内容,我的网络边缘仍然没有显示标签
我在sigma git repo中添加了一个问题 https://github.com/jacomyal/sigma.js/issues/1016
这是我的代码
var i,
j,
s,
N = flowgraph.length,
E = N * (N - 1),
g = {
nodes: [],
edges: []
};
for (i = 0; i < N; i++) {
//node code
}
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
if (flowgraph[i][j] > 0) {
g.edges.push({
id: 'e' + i + '' + j,
source: 'n' + i,
target: 'n' + j,
label: 'edge' + i,
color: '#A6A6A6',
size: 4,
type: 'arrow'
});
}
}
}
s = new sigma({
graph: g,
container: 'graph-container',
settings: {
minEdgeSize: 1,
maxEdgeSize: 4,
edgeLabelSize: 'proportional',
},
type: 'canvas'
});
// Start the layout:
s.refresh();
```javascript
I have imported all the required plugins too
答案 0 :(得分:0)
抱歉,更改后出现了不必要的问题
type: 'canvas'
到
renderer: {
container: document.getElementById('graph-container'),
type: sigma.renderers.canvas,
},
问题已解决。再次抱歉