make selection before ghost selection

master
Matt Huntington 9 years ago
parent c74a1d408b
commit beda3ace8f

@ -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

Loading…
Cancel
Save