Reputation: 611
SigmaJs Is it possible to change attribute of a node/link of an existing graph sigma js? Like i want to change color of a link/node
Upvotes: 0
Views: 473
Reputation: 7478
Yes this is possible, you just have to change any attribute on the sigma graph object. AFter you have to call the refresh function : s.refresh().
This is an example where 's' is your sigma instance:
// NB : using jquery function each
$.each(s.graph.edges(), function(index, edge) {
edge.color = 'blue';
});
s.refresh();
Upvotes: 1