I know that in networkD3 you can specify the color of different nodes by putting them in groups.
Eg.
nodes = data.frame(id = c(0,1,2), name = c("Node 1", "Node 2", "Node 3"), group = c("1","2","3"))
JS('d3.scaleOrdinal().domain(["1", "2", "3"]).range(["#000000", "#111111", "#222222"])')
I wanted to specify a select number of nodes (e.g. just node 1) but then rest of the nodes (e.g. nodes 2 and 3) can be arbitrary colors.
With doing something like this, all the nodes would be the same color:
JS('d3.scaleOrdinal().domain(["1"]).range(["#000000"])')
Would it be possible to specify the node color for select nodes and then other nodes can be arbitrary colors? I'm trying to accomplish this so that if my data set is large I don't need to know how many groups there are to define the colors of the groups whose color can be arbitrary.