Skip to content

Commit 0854346

Browse files
authored
Merge pull request #9 from ac-rossello/group1-purple
Great work @ac-rossello ! Thank you so much
2 parents 0c24e8b + c35a354 commit 0854346

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

index.html

+14-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,20 @@
4444
.data(graph.nodes)
4545
.enter().append("circle")
4646
.attr("r", 5)
47-
.attr("fill", function(d) { return color(d.group); })
47+
.attr("fill",
48+
function(d) {
49+
if(d.group == 1)
50+
{
51+
// Call color() to increment the scale so
52+
// the other colors (not group 1) display normally
53+
color(d.group);
54+
return "purple";
55+
}
56+
else
57+
{
58+
return color(d.group);
59+
}
60+
})
4861
.call(d3.drag()
4962
.on("start", dragstarted)
5063
.on("drag", dragged)

0 commit comments

Comments
 (0)