From c35a354085bdd9d517c7e3c529f6f8fb5690be13 Mon Sep 17 00:00:00 2001 From: Anthony Rossello Date: Tue, 28 Nov 2017 23:18:17 -0500 Subject: [PATCH] Changed the color of Group 1 nodes to purple --- index.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index d27d1f0..ee27492 100644 --- a/index.html +++ b/index.html @@ -44,7 +44,20 @@ .data(graph.nodes) .enter().append("circle") .attr("r", 5) - .attr("fill", function(d) { return color(d.group); }) + .attr("fill", + function(d) { + if(d.group == 1) + { + // Call color() to increment the scale so + // the other colors (not group 1) display normally + color(d.group); + return "purple"; + } + else + { + return color(d.group); + } + }) .call(d3.drag() .on("start", dragstarted) .on("drag", dragged)