Open TonyGoodDay2 opened 7 years ago
Selection methods typically return the current selection, or a new selection, allowing the concise application of multiple operations on a given selection via method chaining.
For example, to set the class and color style of all paragraph elements in the current document:
d3.selectAll("p") .attr("class", "graf") .style("color", "red");
Source: https://github.com/d3/d3-selection/blob/master/README.md#selection
selections bind data to a DOM element
https://github.com/d3/d3-selection
Selections allow powerful data-driven transformation of the document object model (DOM): set attributes, styles, properties, HTML or text content, and more. Using the data join’s enter and exit selections, you can also add or remove elements to correspond to data.
The data operator (binds|joins) input data to selected nodes.
https://bost.ocks.org/mike/selection/
selections are a subclass of array; this subclass provides methods to manipulate selected elements, such as setting attributes and styles.