Adding data for relationships

Now, let's create the relationships by adding the following array to the bottom of app.js. Note that the attributes must be source and target, in order for D3 to do its magic:

var linksData = [
    {"source": "Charlie", "target": "Mac"},
{"source": "Dennis", "target": "Mac"},
{"source": "Dennis", "target": "Dee"},
{"source": "Dee", "target": "Mac"},
{"source": "Dee", "target": "Frank"},
{"source": "Cricket", "target": "Dee"}
];

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.5.49