Question | Answer |
Select a single body element | d3.select("body"); |
bind 4, 8, 15, 16, 23, and 42 as an array to a variable named data | var data = [4, 8, 15, 16, 23, 42]; |
Append a div to an already selected body element Store the newly appended div in a variable named div | var div = body.append("div"); |
Put "Hello, world!" as html to an already selected div element | div.html("Hello, world!"); |
Select all elements tagged as "section" Store this in a variable named section | var section = d3.selectAll("section"); |
What element does "Hello, world!" end up getting added to? d3.selectAll("section").attr("class", "special").append("div").html("Hello, world!"); | The appended "div" |
Store the data join of bar and data into barUpdate The bar selection is defined as bar The data selection is defined as data | var barUpdate = bar.data(data); |
Want to create your own Flashcards for free with GoConqr? Learn more.