diff --git a/D3.md b/D3.md index 07a3fcd..7c904f0 100644 --- a/D3.md +++ b/D3.md @@ -65,7 +65,7 @@ d3.text('path', function(error, data){}); ## Data binding ```javascript -d3.selectAll('circle')//make a "ghost call" to all circles, even if there are none already +d3.select('svg').selectAll('circle')//make a "ghost call" to all circles, even if there are none already. Make sure to select the svg, or appended circles will attach to html element .data(dataArray) //joins each element in dataArray to an element in the selection .enter() //returns the sub section of dataArray that has not been matched with DOM elements .append('circle'); //creates a DOM element for each of the remaining dataArray elements