SigmaJS Edge 标签不显示

SigmaJS Edge labels doesn't display

即使做了我在 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 

对于不必要的问题,我们深表歉意。改变后

type: 'canvas'

renderer: {
        container: document.getElementById('graph-container'),
        type: sigma.renderers.canvas,
    },

问题已解决。我不会删除问题,以防其他人遇到同样的问题。