d3.selectAll()

d3.selectAll(selector)

Selects all elements that match the specified selector string. The elements will be selected in document order (top-to-bottom). If no elements in the document match the selector, or if the selector is null or undefined, returns an empty selection. For example, to select all paragraphs:

var paragraph = d3.selectAll("p");

If the selector is not a string, instead selects the specified array of nodes; this is useful if you already have a reference to nodes, such as this.childNodes within an event listener or a global such as document.links. The nodes may instead be a pseudo-array such as a NodeList or arguments. For example, to color all links red:

d3.selectAll(document.links).style("color", "red");
doc_D3_Js
2016-11-24 10:27:15
Comments
Leave a Comment

Please login to continue.