selection.nodes()

selection.nodes() Returns an array of all (non-null) elements in this selection.

selection.node()

selection.node() Returns the first (non-null) element in this selection. If the selection is empty, returns null.

selection.merge()

selection.merge(other) Returns a new selection merging this selection with the specified other selection. The returned selection has the same number of groups and the same parents as this selection. Any missing (null) elements in this selection are filled with the corresponding element, if present (not null), from the specified selection. (If the other selection has additional groups or parents, they are ignored.) This method is commonly used to merge the enter and update selections after a

selection.lower()

selection.lower() Re-inserts each selected element, in order, as the first child of its parent. Equivalent to: selection.each(function() { this.parentNode.insertBefore(this, this.parentNode.firstChild); });

selection.interrupt()

selection.interrupt([name]) Interrupts the active transition of the specified name on the selected elements, and cancels any pending transitions with the specified name, if any. If a name is not specified, null is used. Interrupting a transition on an element has no effect on any transitions on any descendant elements. For example, an axis transition consists of multiple independent, synchronized transitions on the descendants of the axis G element (the tick lines, the tick labels, the domai

selection.insert()

selection.insert(type, before) If the specified type is a string, inserts a new element of this type (tag name) before the element matching the specified before selector for each selected element. For example, a before selector :first-child will prepend nodes before the first child. Both type and before may instead be specified as functions which are evaluated for each selected element, in order, being passed the current datum (d), the current index (i), and the current group (nodes), with t

selection.html()

selection.html([value]) If a value is specified, sets the inner HTML to the specified value on all selected elements, replacing any existing child elements. If the value is a constant, then all elements are given the same inner HTML; otherwise, if the value is a function, then the function is evaluated for each selected element, in order, being passed the current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element. The function’s return value

selection.filter()

selection.filter(filter) Filters the selection, returning a new selection that contains only the elements for which the specified filter is true. The filter may be specified either as a selector string or a function. If a function, it is evaluated for each selected element, in order, being passed the current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element. For example, to filter a selection of table rows to contain only even rows: var eve

selection.exit()

selection.exit() Returns the exit selection: existing DOM elements in the selection for which no new datum was found. The exit selection is determined by the previous selection.data, and is thus empty until the selection is joined to data. If the exit selection is retrieved more than once after a data join, subsequent calls return the empty selection. The exit selection is typically used to remove “superfluous” elements corresponding to old data. For example, to update the DIV elements creat

selection.enter()

selection.enter() Returns the enter selection: placeholder nodes for each datum that had no corresponding DOM element in the selection. The enter selection is determined by selection.data, and is empty on a selection that is not joined to data. The enter selection is typically used to create “missing” elements corresponding to new data. For example, to create DIV elements from an array of numbers: var div = d3.select("body") .selectAll("div") .data([4, 8, 15, 16, 23, 42]) .enter().appe