Was trying out the draggable network and wanted to be able to use different colours for different links. When I commented out the lines
/*var link = svg.append
Do this
var link = svg.append("g")
.selectAll("line");
Instead of
var link = svg.append("g");
Now you can see all your links in orange color.
Add class names using conditions like this.
link.data(graph.links).enter()
.append("line")
.attr("class",function(d){
return (d.source.x>400 && d.source.y<300)?'link-b':'link-r';
});