Skip to content
Snippets Groups Projects
Commit 7e45a45a authored by Nick Bastin's avatar Nick Bastin
Browse files

Draw lines

parent 37fa8eac
No related branches found
No related tags found
No related merge requests found
......@@ -38,11 +38,11 @@ window.TopologyView = Backbone.View.extend({
force.nodes(this.model.nodes).links(this.model.links).start();
var link = svg.selectAll("line.link").data(this.model.links).enter()
.append("line").attr("class", "link")
.style("stroke-width", function(d) { return Math.sqrt(d.value); });
.style("stroke", function (d) { return "black"; });
var node = svg.selectAll("circle.node").data(this.model.nodes)
.enter().append("circle")
.attr("class", "node")
.attr("r", 5)
.attr("r", 10)
.style("fill", function(d) { return color(d.group); })
.call(force.drag);
node.append("title").text(function(d) { return d.name; });
......@@ -58,4 +58,4 @@ window.TopologyView = Backbone.View.extend({
}
return this;
}
});
\ No newline at end of file
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment