uber/react-vis-force

Render same color of nodes in a group ?

NKumawat23 opened this issue · 1 comments

I need to group up the nodes of same color. I tried with forceCluster which is placed inside updateSimulation but not working. please suggest what's wrong with my code OR if there is another way available .
Using : InteractiveForceGraph
code looks like :

> updateSimulation={function( sim,options){
> 	sim.force('cluster', forceCluster()
> 	.centers(function (d) {
> 	return gCluster[that.getGroup(d.id).group] })
> 	.strength(5));
> 
>         sim.restart();
>         return sim;
> }}

will also like to know how to group nodes of same group/color.