I am a beginner of D3 and was trying to grasp the ropes on how to build a proper force-directed graph in D3. There appear to be two different ways to build it.
I'm more or less comfortable with the first as the code is shorter and easier to understand. However, it is hard to translate functions from one sample codes using example 2 to example 1 without a proper understanding. Would anyone be able to describe the advantages or disadvantages for each?
Thank you.