【发布时间】:2014-01-26 23:08:44
【问题描述】:
使用 Sigma.js 我想将自定义图像添加到图形的节点。我找到了a plugin,包含了nodeShapes.js 和plotter.js,然后添加了一个图片属性:
var imgUri="somepicture.png"
sigInst.addNode(id,{
'x': Math.random(),
'y': Math.random(),
'label': data.nodes[i].val,
// 'color': color, commenting this line out to add custom images to the nodes
'image':{'url':imgUri},
'cluster': clusters['cluster_id']
});
但图表保持不变,我仍然看到默认点。
【问题讨论】:
标签: javascript sigma.js