Graphics Reference
In-Depth Information
Figure 8-7: This very simple graph is drawn in D3 using the sample code
provided.
If you look closely, you will see that the blue lines are on top of the nodes.
You can fix this easily by putting the links section of the code before the
nodes section of the code. This means that the nodes will draw on top of the
links.
Using Different Data
Because the example code was written to be fairly flexible, you should be
able to change the data set and otherwise use the same code. Now, let's
substitute the data to use the same data set as presented in Chapter 5,
“Visual Attributes” (that is, a data set with approximately 70 people sending
e-mails to each other), in JavaScript format. The data is available in
JavaScript form in the Supplemental Materials on this topic's companion
website.
 
Search WWH ::




Custom Search