What do the nodes, groups, and values mean in the JSON for a d3 force-directed graph? What do the nodes, groups, and values mean in the JSON for a d3 force-directed graph? json json

What do the nodes, groups, and values mean in the JSON for a d3 force-directed graph?


In the d3 force-directed graph example, the 'value' of links is mapped to the stroke width of the edges and the 'group' of nodes is mapped to the color of the nodes. The integer value of 'source' and 'target' in links refers to the array index of the corresponding node in nodes (https://github.com/mbostock/d3/wiki/Force-Layout#wiki-links).

If you change source links to

 "links":[{"source":0,"target":1,"value":2}]}

it, d3 should render an edge between the two nodes.