Browse files

Complete selections

  • Loading branch information...
1 parent 0f7b687 commit 0b9d8563ab34fcc4151ea0201b2d9ff973f51e68 @Phrogz committed Mar 18, 2012
Showing with 98 additions and 30 deletions.
  1. +98 −30 selection.yaml
View
128 selection.yaml
@@ -43,8 +43,7 @@
- name: func
kind: js/Function
summary: "The function is evaluated for each selected element (in order), being passed the current datum `d` and the current index `i`, with the `this` context as the current DOM element. The function's return value is then used to set each element's attribute. A `null` value will remove the specified attribute."
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: classed§get
returns: js/Boolean
summary: Check to see if the selection has the specified class.
@@ -83,8 +82,7 @@
- name: func
kind: js/Function
summary: "The function is evaluated for each selected element (in order), being passed the current datum `d` and the current index `i`, with the `this` context as the current DOM element. The function's return value is then used to assign or unassign the specified class on each element."
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: style§get
returns: js/String
summary: Get the computed value of a CSS style property.
@@ -131,8 +129,7 @@
kind: js/String
summary: Either `null` or the string `"important"`.
optional: true
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: property§get
returns: js/String
summary: Get the value of a DOM property.
@@ -178,8 +175,7 @@
- name: func
kind: js/Function
summary: "The function is evaluated for each selected element (in order), being passed the current datum `d` and the current index `i`, with the `this` context as the current DOM element. The function's return value is then used to set each element's property."
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: text§get
returns: js/String
summary: Get the `textContent` for a DOM element.
@@ -214,8 +210,7 @@
- name: func
kind: js/Function
summary: "The function is evaluated for each selected element (in order), being passed the current datum `d` and the current index `i`, with the `this` context as the current DOM element. The function's return value is then used to set each element's text content. A `null` value will clear the content."
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: html§get
returns: js/String
summary: Get the `innerHTML` for a DOM element.
@@ -252,8 +247,7 @@
- name: func
kind: js/Function
summary: "The function is evaluated for each selected element (in order), being passed the current datum `d` and the current index `i`, with the `this` conhtml as the current DOM element. The function's return value is then used to set each element's html content. A `null` value will clear the content."
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: append
returns: d3/Selection
summary: "Create and append new elements, returning a new selection of them."
@@ -265,8 +259,7 @@
- name: tagName
kind: js/String
summary: "May have a namespace prefix, such as `svg:text` to create a `<text>` element in the SVG namespace. By default, D3 supports svg, xhtml, xlink, xml and xmlns namespaces. Additional namespaces can be registered by adding to [`d3.ns.prefix`](https://github.com/mbostock/d3/wiki/Namespaces#wiki-prefix)."
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: insert
returns: js/String
summary: "Create and insert new elements before existing ones, returning a selection of the new elements."
@@ -281,14 +274,12 @@
- name: beforeSelector
kind: js/String
summary: A selector to find the element to insert the new element before.
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: remove
returns: d3/Selection
summary: "Remove all elements in the selection from the document; returns the selection."
url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-remove'
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: data§get
returns: js/Array
summary: Get the data array for the first group in the selection.
@@ -326,8 +317,7 @@
kind: js/Function
summary: This function is yielded the values of the array and must return a unique string for each.
optional: true
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: datum§get
returns: js/Object
summary: Return the data associated with the first element in the selection (if any).
@@ -359,27 +349,24 @@
seealso:
- d3/Selection/datum§get
- d3/Selection/datum§func
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: enter
returns: d3/EnterSelection
summary: Return the array of placeholders for 'missing' elements associated with data.
- details: You **must** call [`data()`](objjob://d3/Selection/data) on the selection before this method will be available.
+ details: You **must** call [`data()`](objjob:d3/Selection/data) on the selection before this method will be available.
url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-enter'
seealso:
- d3/UpdateSelection/exit
- d3/Selection/attr§func
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: exit
returns: d3/Selection
summary: Return the selection of elements no longer associated with data.
- details: You **must** call [`data()`](objjob://d3/Selection/data) on the selection before this method will be available.
+ details: You **must** call [`data()`](objjob:d3/Selection/data) on the selection before this method will be available.
url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-exit'
seealso:
- d3/UpdateSelection/enter
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: sort
returns: d3/Selection
summary: Sort the order of elements in the selection (and DOM) according to custom criteria.
@@ -391,12 +378,93 @@
summary: "This function is passed two data elements _a_ and _b_ to compare, and must return either a negative number, positive number, or zero. If negative, then _a_ should be before _b_; if positive, then _a_ should be after _b_; if zero, _a_ and _b_ are considered equal and the order is arbitrary."
seealso:
- d3/Selection/order
- #--------------------------------------------------------------------------
- -
+ - #--------------------------------------------------------------------------
name: order
returns: d3/Selection
summary: Reorder the elements in the DOM to match the order of elements in the selection.
details: The elements in the DOM will all be adjacent siblings following the first item after calling this method; elements not in the selection that were previously interleaved with elements from the selection will occur after all elements of the selection.
url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-order'
seealso:
- d3/Selection/sort
+ - #--------------------------------------------------------------------------
+ name: on§get
+ returns: d3/Selection
+ summary: Retrieve the event listener for an event type.
+ url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-on'
+ seealso:
+ - d3/Selection/on§set
+ params:
+ - name: eventName
+ kind: js/String
+ summary: "Name of the event, e.g. 'click' or 'mouseover'."
+ -
+ name: on§set
+ returns: d3/Selection
+ summary: Retrieve the event listener for an event type.
+ url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-on'
+ seealso:
+ - d3/Selection/on§get
+ - d3/event
+ params:
+ - name: eventName
+ kind: js/String
+ summary: "Name of the event, e.g. 'click' or 'mouseover'. To register multiple handlers for the same type on the same element, use a trailing namespace, e.g. 'click.foo' and 'click.bar'."
+ - name: eventHandler
+ kind: js/Function
+ summary: "Function to be invoked when the event occurs. Will be passed the datum for the current object, the index of that object in the selection, and with the `this` context set to the DOM element. To remove an event handler, pass `null` for this parameter."
+ - name: capturePhase
+ kind: js/Boolean
+ summary: "Corresponds to the [W3C useCapture flag](http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration)."
+ - #--------------------------------------------------------------------------
+ name: transition
+ returns: d3/Selection
+ summary: Start a new [`Transition`](objjob:d3/Transition) for the selection.
+ url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-transition'
+ seealso:
+ - d3/Transition
+ - #--------------------------------------------------------------------------
+ name: select§value
+ returns: d3/Selection
+ summary: Find the first descendant elements of the selection matching a selector.
+ url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-select'
+ seealso:
+ - d3/Selection/select§func
+ - d3/Selection/selectAll§value
+ params:
+ - name: selector
+ kind: js/String
+ -
+ name: select§func
+ returns: d3/Selection
+ summary: Use a function to select a different element for each entry in the selection.
+ url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-select'
+ seealso:
+ - d3/Selection/select§value
+ - d3/Selection/selectAll§func
+ params:
+ - name: selectCalculator
+ kind: js/Function
+ summary: "Invoked for each entry in the selection, with parameters for the current datum and index, and with the `this` context as the current DOM element. Must return either an element or `null`."
+ - #--------------------------------------------------------------------------
+ name: selectAll§value
+ returns: d3/Selection
+ summary: Select multiple elements for each entry in the selection.
+ url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-selectAll'
+ seealso:
+ - d3/Selection/selectAll§func
+ - d3/Selection/select§value
+ params:
+ - name: selector
+ kind: js/String
+ -
+ name: selectAll§func
+ returns: d3/Selection
+ summary: Use a function to select multiple elements for each entry in the selection.
+ url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-select'
+ seealso:
+ - d3/Selection/selectAll§value
+ - d3/Selection/select§func
+ params:
+ - name: selectCalculator
+ kind: js/Function
+ summary: "Invoked for each entry in the selection, with parameters for the current datum and index, and with the `this` context as the current DOM element. Must return either an array or [`NodeList`](objjob:dom/NodeList) (either of which may be empty)."

0 comments on commit 0b9d856

Please sign in to comment.