Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 6 commits
  • 45 files changed
  • 0 commit comments
  • 1 contributor
Showing with 740 additions and 579 deletions.
  1. +0 −5 _language.yaml
  2. +0 −104 core.yaml
  3. +6 −0 languages/d3.yaml
  4. +12 −0 methods/d3-EnterSelection-append.yaml
  5. +5 −0 methods/d3-EnterSelection-empty.yaml
  6. +15 −0 methods/d3-EnterSelection-insert.yaml
  7. +5 −0 methods/d3-EnterSelection-node.yaml
  8. +12 −0 methods/d3-Selection-append.yaml
  9. +37 −0 methods/d3-Selection-attr.yaml
  10. +20 −0 methods/d3-Selection-call.yaml
  11. +37 −0 methods/d3-Selection-classed.yaml
  12. +36 −0 methods/d3-Selection-data.yaml
  13. +30 −0 methods/d3-Selection-datum.yaml
  14. +11 −0 methods/d3-Selection-each.yaml
  15. +5 −0 methods/d3-Selection-empty.yaml
  16. +8 −0 methods/d3-Selection-enter.yaml
  17. +7 −0 methods/d3-Selection-exit.yaml
  18. +35 −0 methods/d3-Selection-html.yaml
  19. +15 −0 methods/d3-Selection-insert.yaml
  20. +5 −0 methods/d3-Selection-node.yaml
  21. +28 −0 methods/d3-Selection-on.yaml
  22. +7 −0 methods/d3-Selection-order.yaml
  23. +44 −0 methods/d3-Selection-property.yaml
  24. +5 −0 methods/d3-Selection-remove.yaml
  25. +22 −0 methods/d3-Selection-select.yaml
  26. +22 −0 methods/d3-Selection-selectAll.yaml
  27. +11 −0 methods/d3-Selection-sort.yaml
  28. +45 −0 methods/d3-Selection-style.yaml
  29. +33 −0 methods/d3-Selection-text.yaml
  30. +7 −0 methods/d3-Selection-transition.yaml
  31. +23 −0 methods/d3-Transition-delay.yaml
  32. +23 −0 methods/d3-Transition-duration.yaml
  33. +24 −0 methods/d3-Transition-ease.yaml
  34. +21 −0 methods/d3-d3-ease.yaml
  35. +14 −0 methods/d3-d3-mouse.yaml
  36. +29 −0 methods/d3-d3-select.yaml
  37. +30 −0 methods/d3-d3-selectAll.yaml
  38. +14 −0 methods/d3-d3-touches.yaml
  39. +11 −0 methods/d3-d3-transition.yaml
  40. +5 −0 objects/d3-EnterSelection.yaml
  41. +5 −0 objects/d3-Selection.yaml
  42. +5 −0 objects/d3-Transition.yaml
  43. +5 −0 objects/d3-d3.yaml
  44. +6 −0 properties/d3-d3-event.yaml
  45. +0 −470 selection.yaml
View
5 _language.yaml
@@ -1,5 +0,0 @@
-name: D3.js
-url: http://mbostock.github.com/d3/
-prefix: d3
-copyright: "Portions copyright (c) 2012, Michael Bostock"
-overview: A JavaScript visualization library for HTML and SVG
View
104 core.yaml
@@ -1,104 +0,0 @@
--
- object: d3/d3
- from: js/Object
- title: D3.js namespace object
- url: https://github.com/mbostock/d3/wiki/API-Reference
- methods:
- -
- name: select§selector
- scope: self
- returns: d3/Selection
- summary: Select an element from the current document.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-d3_select'
- seealso:
- - d3/d3/select§node
- - d3/d3/selectAll§selector
- - d3/d3/selectAll§nodes
- - d3/Selection/select
- - d3/Selection/selectAll
- params:
- - name: selector
- kind: js/String
- -
- name: select§node
- scope: self
- returns: d3/Selection
- summary: Select an element from the current document.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-d3_select'
- seealso:
- - d3/d3/select§selector
- - d3/d3/selectAll§selector
- - d3/d3/selectAll§nodes
- - d3/Selection/select
- - d3/Selection/selectAll
- params:
- - name: node
- kind: js/Array
- -
- name: selectAll§selector
- scope: self
- returns: d3/Selection
- summary: Select multiple elements from the current document.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-d3_selectAll'
- seealso:
- - d3/d3/select§node
- - d3/d3/select§selector
- - d3/d3/selectAll§nodes
- - d3/Selection/select
- - d3/Selection/selectAll
- params:
- - name: selector
- kind: js/String
- -
- name: selectAll§nodes
- scope: self
- returns: d3/Selection
- summary: Select multiple elements from the current document.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-d3_selectAll'
- seealso:
- - d3/d3/select§node
- - d3/d3/select§selector
- - d3/d3/selectAll§selector
- - d3/Selection/select
- - d3/Selection/selectAll
- params:
- - name: nodes
- kind: js/Array
- summary: "May be an array or array-like object (e.g. a [`NodeList`](objjob:dom/NodeList) or [`arguments`](objjob:js/Function/arguments))."
- -
- name: mouse
- scope: self
- returns: js/Array
- summary: "Find x,y coordinates of the current mouse event relative to a container element."
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-d3_mouse'
- seealso:
- - d3/Selection/on§set
- - d3/d3/event
- - d3/d3/touches
- params:
- - name: container
- kind: dom/Element
- summary: The HTML or SVG container element to find the coordinates relative to.
- -
- name: touches
- scope: self
- returns: js/Array
- summary: "Find multiple x,y coordinates of the current touch events relative to a container element."
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-d3_touches'
- seealso:
- - d3/Selection/on§set
- - d3/d3/event
- - d3/d3/mouse
- params:
- - name: container
- kind: dom/Element
- summary: The HTML or SVG container element to find the coordinates relative to.
-
- properties:
- -
- name: event
- scope: self
- kind: events/Event
- summary: The current event (if any). Used for handling events during a callback invoked [`selection.on()`](objjob:d3/Selection/on§set).
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-d3_event'
-
View
6 languages/d3.yaml
@@ -0,0 +1,6 @@
+---
+language: d3
+name: D3.js
+url: http://mbostock.github.com/d3/
+copyright: Portions copyright (c) 2012, Michael Bostock
+summary: A JavaScript visualization library for HTML and SVG
View
12 methods/d3-EnterSelection-append.yaml
@@ -0,0 +1,12 @@
+---
+method: d3/EnterSelection/append
+returns: d3/Selection
+summary: Create and append new elements for all the placeholder entries, returning a new selection of the created elements.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-append
+seealso:
+- d3/Selection/html§value
+- d3/Selection/insert
+params:
+- 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).
View
5 methods/d3-EnterSelection-empty.yaml
@@ -0,0 +1,5 @@
+---
+method: d3/EnterSelection/empty
+returns: js/Boolean
+summary: Test if there are any DOM elements in the selection.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-empty
View
15 methods/d3-EnterSelection-insert.yaml
@@ -0,0 +1,15 @@
+---
+method: d3/EnterSelection/insert
+returns: js/String
+summary: Create and insert new elements before existing ones, returning a selection of the new elements.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-insert
+seealso:
+- d3/Selection/append
+- d3/Selection/html§value
+params:
+- 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: beforeSelector
+ kind: js/String
+ summary: A selector to find the element to insert the new element before.
View
5 methods/d3-EnterSelection-node.yaml
@@ -0,0 +1,5 @@
+---
+method: d3/EnterSelection/node
+returns: dom/Element
+summary: Find the first DOM element in the selection.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-node
View
12 methods/d3-Selection-append.yaml
@@ -0,0 +1,12 @@
+---
+method: d3/Selection/append
+returns: d3/Selection
+summary: Create and append new elements, returning a new selection of them.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-append
+seealso:
+- d3/Selection/html§value
+- d3/Selection/insert
+params:
+- 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).
View
37 methods/d3-Selection-attr.yaml
@@ -0,0 +1,37 @@
+---
+- method: d3/Selection/attr§get
+ returns: d3/Selection
+ summary: Get attribute value.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-attr
+ seealso:
+ - d3/Selection/attr§value
+ - d3/Selection/attr§func
+ params:
+ - name: name
+ kind: js/String
+- method: d3/Selection/attr§value
+ returns: d3/Selection
+ summary: Set attribute to a value.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-attr
+ seealso:
+ - d3/Selection/attr§get
+ - d3/Selection/attr§func
+ params:
+ - name: name
+ kind: js/String
+ - name: value
+ kind: js/String
+ summary: Non-string values (e.g. a number like `10`) are coerced to strings before setting.
+- method: d3/Selection/attr§func
+ returns: d3/Selection
+ summary: Set attribute value from data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-attr
+ seealso:
+ - d3/Selection/attr§get
+ - d3/Selection/attr§value
+ params:
+ - name: name
+ kind: js/String
+ - 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.
View
20 methods/d3-Selection-call.yaml
@@ -0,0 +1,20 @@
+---
+method: d3/Selection/call
+returns: d3/Selection
+summary: Invoke a function, passing the selection and returning it.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-call
+seealso:
+- d3/Selection/each
+params:
+- name: func
+ kind: js/Function
+ summary: Invoked and passed the selection (and any additional arguments); the `this` is also set to the selection.
+- name: funcArg1
+ kind: js/Object
+ optional: true
+- name: funcArg2
+ kind: js/Object
+ optional: true
+- name:
+ kind: js/Object
+ optional: true
View
37 methods/d3-Selection-classed.yaml
@@ -0,0 +1,37 @@
+---
+- method: d3/Selection/classed§get
+ returns: js/Boolean
+ summary: Check to see if the selection has the specified class.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-classed
+ seealso:
+ - d3/Selection/classed§value
+ - d3/Selection/classed§func
+ params:
+ - name: name
+ kind: js/String
+- method: d3/Selection/classed§value
+ returns: d3/Selection
+ summary: Add/remove a CSS class from the selection.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-classed
+ seealso:
+ - d3/Selection/classed§get
+ - d3/Selection/classed§func
+ params:
+ - name: name
+ kind: js/String
+ - name: setFlag
+ kind: js/Boolean
+ summary: Whether to add or remove the class name. If this parameter is not a boolean it is forced to one.
+- method: d3/Selection/classed§func
+ returns: d3/Selection
+ summary: Add/remove a CSS class from the selection based on data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-classed
+ seealso:
+ - d3/Selection/classed§get
+ - d3/Selection/classed§value
+ params:
+ - name: name
+ kind: js/String
+ - 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.
View
36 methods/d3-Selection-data.yaml
@@ -0,0 +1,36 @@
+---
+- method: d3/Selection/data§get
+ returns: js/Array
+ summary: Get the data array for the first group in the selection.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-data
+ seealso:
+ - d3/Selection/data§value
+ - d3/Selection/data§func
+- method: d3/Selection/data§value
+ returns: d3/Selection
+ summary: Set the data array for the selection, computing the update, enter, and exit selections.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-data
+ seealso:
+ - d3/Selection/data§get
+ - d3/Selection/data§func
+ params:
+ - name: dataValues
+ kind: js/Array
+ - name: keyCalculator
+ kind: js/Function
+ summary: This function is yielded the values of the array and must return a unique string for each.
+ optional: true
+- method: d3/Selection/data§func
+ returns: d3/Selection
+ summary: Set the data array for the selection based on existing data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-data
+ seealso:
+ - d3/Selection/data§get
+ - d3/Selection/data§value
+ params:
+ - name: dataCalculator
+ kind: js/Function
+ - name: keyCalculator
+ kind: js/Function
+ summary: This function is yielded the values of the array and must return a unique string for each.
+ optional: true
View
30 methods/d3-Selection-datum.yaml
@@ -0,0 +1,30 @@
+---
+- method: d3/Selection/datum§get
+ returns: js/Object
+ summary: Return the data associated with the first element in the selection (if any).
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-datum
+ seealso:
+ - d3/Selection/datum§value
+ - d3/Selection/datum§func
+- method: d3/Selection/datum§value
+ returns: d3/Selection
+ summary: Set the data associated with elements in the selection.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-datum
+ seealso:
+ - d3/Selection/datum§get
+ - d3/Selection/datum§func
+ params:
+ - name: value
+ kind: js/Object
+ summary: May be any JavaScript object (number, array, string, DOM element, etc.)
+- method: d3/Selection/datum§func
+ returns: d3/Selection
+ summary: Set the data associated with elements in the selection based on existing data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-datum
+ seealso:
+ - d3/Selection/datum§get
+ - d3/Selection/datum§func
+ params:
+ - name: func
+ kind: js/Function
+ summary: This function is invoked for each selected element, being passed the previous datum `d` and the current index `i`, with the `this` context as the current DOM element. The return value of this function is used to set each element's data. A `null` value will delete the bound data.
View
11 methods/d3-Selection-each.yaml
@@ -0,0 +1,11 @@
+---
+method: d3/Selection/each
+returns: d3/Selection
+summary: Call a function for each element in the selection.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-each
+seealso:
+- d3/Selection/call
+params:
+- name: func
+ kind: js/Function
+ summary: Invoked for each element in the selection, passed the datum and index, with the `this` context set to the DOM element.
View
5 methods/d3-Selection-empty.yaml
@@ -0,0 +1,5 @@
+---
+method: d3/Selection/empty
+returns: js/Boolean
+summary: Test if there are any DOM elements in the selection.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-empty
View
8 methods/d3-Selection-enter.yaml
@@ -0,0 +1,8 @@
+---
+method: d3/Selection/enter
+returns: d3/EnterSelection
+summary: Return the array of placeholders for 'missing' elements associated with data.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-enter
+seealso:
+- d3/Selection/exit
+- d3/Selection/attr§func
View
7 methods/d3-Selection-exit.yaml
@@ -0,0 +1,7 @@
+---
+method: d3/Selection/exit
+returns: d3/Selection
+summary: Return the selection of elements no longer associated with data.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-exit
+seealso:
+- d3/Selection/enter
View
35 methods/d3-Selection-html.yaml
@@ -0,0 +1,35 @@
+---
+- method: d3/Selection/html§get
+ returns: js/String
+ summary: Get the `innerHTML` for a DOM element.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-html
+ seealso:
+ - d3/Selection/html§value
+ - d3/Selection/html§func
+ - d3/Selection/text§get
+- method: d3/Selection/html§value
+ returns: d3/Selection
+ summary: Set the HTML content for elements in the selection.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-html
+ seealso:
+ - d3/Selection/html§get
+ - d3/Selection/html§func
+ - d3/Selection/text§value
+ - d3/Selection/append
+ - d3/Selection/insert
+ params:
+ - name: newHTML
+ kind: js/String
+ summary: If this parameter is not a string it is forced to one.
+- method: d3/Selection/html§func
+ returns: d3/Selection
+ summary: Set the HTML content for elements in the selection based on data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-html
+ seealso:
+ - d3/Selection/html§get
+ - d3/Selection/html§value
+ - d3/Selection/text§func
+ params:
+ - 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.
View
15 methods/d3-Selection-insert.yaml
@@ -0,0 +1,15 @@
+---
+method: d3/Selection/insert
+returns: js/String
+summary: Create and insert new elements before existing ones, returning a selection of the new elements.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-insert
+seealso:
+- d3/Selection/append
+- d3/Selection/html§value
+params:
+- 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: beforeSelector
+ kind: js/String
+ summary: A selector to find the element to insert the new element before.
View
5 methods/d3-Selection-node.yaml
@@ -0,0 +1,5 @@
+---
+method: d3/Selection/call
+returns: dom/Element
+summary: Find the first DOM element in the selection.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-node
View
28 methods/d3-Selection-on.yaml
@@ -0,0 +1,28 @@
+---
+- method: d3/Selection/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'.
+- method: d3/Selection/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/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).
View
7 methods/d3-Selection-order.yaml
@@ -0,0 +1,7 @@
+---
+method: d3/Selection/order
+returns: d3/Selection
+summary: Reorder the elements in the DOM to match the order of elements in the selection.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-order
+seealso:
+- d3/Selection/sort
View
44 methods/d3-Selection-property.yaml
@@ -0,0 +1,44 @@
+---
+- method: d3/Selection/property§get
+ returns: js/String
+ summary: Get the value of a DOM property.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-property
+ seealso:
+ - d3/Selection/property§value
+ - d3/Selection/property§func
+ - d3/Selection/attr§get
+ params:
+ - name: name
+ kind: js/String
+- method: d3/Selection/property§value
+ returns: d3/Selection
+ summary: Set a DOM property for elements in the selection.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-property
+ seealso:
+ - d3/Selection/property§get
+ - d3/Selection/property§func
+ - d3/Selection/attr§value
+ params:
+ - name: name
+ kind: js/String
+ - name: value
+ kind: js/String
+ summary: If this parameter is not a string it is forced to one.
+ - name: priority
+ kind: js/String
+ summary: Either `null` or the string `"important"`.
+ optional: true
+- method: d3/Selection/property§func
+ returns: d3/Selection
+ summary: Set a DOM property for elements in the selection based on data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-property
+ seealso:
+ - d3/Selection/property§get
+ - d3/Selection/property§value
+ - d3/Selection/attr§func
+ params:
+ - name: name
+ kind: js/String
+ - 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.
View
5 methods/d3-Selection-remove.yaml
@@ -0,0 +1,5 @@
+---
+method: d3/Selection/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
View
22 methods/d3-Selection-select.yaml
@@ -0,0 +1,22 @@
+---
+- method: d3/Selection/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
+- method: d3/Selection/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`.
View
22 methods/d3-Selection-selectAll.yaml
@@ -0,0 +1,22 @@
+---
+- method: d3/Selection/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
+- method: d3/Selection/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).
View
11 methods/d3-Selection-sort.yaml
@@ -0,0 +1,11 @@
+---
+method: d3/Selection/sort
+returns: d3/Selection
+summary: Sort the order of elements in the selection (and DOM) according to custom criteria.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-sort
+seealso:
+- d3/Selection/order
+params:
+- name: comparator
+ kind: js/Function
+ 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.
View
45 methods/d3-Selection-style.yaml
@@ -0,0 +1,45 @@
+---
+- method: d3/Selection/style§get
+ returns: js/String
+ summary: Get the computed value of a CSS style property.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-style
+ seealso:
+ - d3/Selection/style§value
+ - d3/Selection/style§func
+ params:
+ - name: name
+ kind: js/String
+- method: d3/Selection/style§value
+ returns: d3/Selection
+ summary: Set a CSS style property for elements in the selection.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-style
+ seealso:
+ - d3/Selection/style§get
+ - d3/Selection/style§func
+ params:
+ - name: name
+ kind: js/String
+ - name: value
+ kind: js/String
+ summary: If this parameter is not a string it is forced to one.
+ - name: priority
+ kind: js/String
+ summary: Either `null` or the string `"important"`.
+ optional: true
+- method: d3/Selection/style§func
+ returns: d3/Selection
+ summary: Set a CSS style property for elements in the selection based on data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-style
+ seealso:
+ - d3/Selection/style§get
+ - d3/Selection/style§value
+ params:
+ - name: name
+ kind: js/String
+ - 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 style property. A `null` value will remove the style property
+ - name: priority
+ kind: js/String
+ summary: Either `null` or the string `"important"`.
+ optional: true
View
33 methods/d3-Selection-text.yaml
@@ -0,0 +1,33 @@
+---
+- method: d3/Selection/text§get
+ returns: js/String
+ summary: Get the `textContent` for a DOM element.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-text
+ seealso:
+ - d3/Selection/text§value
+ - d3/Selection/text§func
+ - d3/Selection/html§get
+- method: d3/Selection/text§value
+ returns: d3/Selection
+ summary: Set the text content for elements in the selection.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-text
+ seealso:
+ - d3/Selection/text§get
+ - d3/Selection/text§func
+ - d3/Selection/html§value
+ params:
+ - name: newText
+ kind: js/String
+ summary: If this parameter is not a string it is forced to one.
+- method: d3/Selection/text§func
+ returns: d3/Selection
+ summary: Set the text content for elements in the selection based on data.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-text
+ seealso:
+ - d3/Selection/text§get
+ - d3/Selection/text§value
+ - d3/Selection/html§func
+ params:
+ - 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.
View
7 methods/d3-Selection-transition.yaml
@@ -0,0 +1,7 @@
+---
+method: d3/Selection/transition
+returns: d3/Transition
+summary: Start a new [`Transition`](objjob:d3/Transition) for the selection.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-transition
+seealso:
+- d3/d3/transition
View
23 methods/d3-Transition-delay.yaml
@@ -0,0 +1,23 @@
+---
+-
+ method: d3/Transition/delay§value
+ returns: d3/Transition
+ summary: Specify transition delay for all elements.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-delay
+ seealso:
+ - d3/Transition/delay§func
+ params:
+ - name: delayMS
+ kind: js/Number
+ summary: Delay before starting the transition, in milliseconds.
+-
+ method: d3/Transition/delay§func
+ returns: d3/Transition
+ summary: Calculate per-element transition delay.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-delay
+ seealso:
+ - d3/Transition/delay§value
+ params:
+ - name: delayCalculator
+ kind: js/Function
+ summary: Invoked for each element in the transition selection, passed the element's datum, index, and with the `this` context set to the element. The return value is set as the transition delay for the element, in milliseconds.
View
23 methods/d3-Transition-duration.yaml
@@ -0,0 +1,23 @@
+---
+-
+ method: d3/Transition/duration§value
+ returns: d3/Transition
+ summary: Specify transition duration for all elements.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-duration
+ seealso:
+ - d3/Transition/duration§func
+ params:
+ - name: durationMS
+ kind: js/Number
+ summary: Running time of the transition, in milliseconds.
+-
+ method: d3/Transition/duration§func
+ returns: d3/Transition
+ summary: Calculate per-element transition duration.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-duration
+ seealso:
+ - d3/Transition/duration§value
+ params:
+ - name: durationCalculator
+ kind: js/Function
+ summary: Invoked for each element in the transition selection, passed the element's datum, index, and with the `this` context set to the element. The return value is set as the transition duration for the element, in milliseconds.
View
24 methods/d3-Transition-ease.yaml
@@ -0,0 +1,24 @@
+---
+-
+ method: d3/Transition/ease§value
+ returns: d3/Transition
+ summary: Specify easing method for all elements.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-ease
+ seealso:
+ - d3/Transition/ease§func
+ - d3/d3/ease
+ params:
+ - name: easeType
+ kind: js/String
+ summary: One of the [predefined easing methods](https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_ease).
+-
+ method: d3/Transition/ease§func
+ returns: d3/Transition
+ summary: Specify a custom easing function for all elements.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-ease
+ seealso:
+ - d3/Transition/ease§value
+ - d3/d3/ease
+ params:
+ - name: easingFunction
+ kind: js/Function
View
21 methods/d3-d3-ease.yaml
@@ -0,0 +1,21 @@
+---
+method: d3/d3/ease
+scope: self
+returns: js/Function
+summary: Retrieve a predefined easing function.
+url: https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_ease
+seealso:
+- d3/Transition/ease§value
+- d3/Transition/ease§func
+params:
+- name: easingType
+ kind: js/String
+ summary: One of the [predefined easing types](https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_ease).
+- name: easeParam1
+ kind: js/String
+ summary: Additional parameter based on the easing function.
+ optional: true
+- name: easeParam2
+ kind: js/String
+ summary: Additional parameter based on the easing function.
+ optional: true
View
14 methods/d3-d3-mouse.yaml
@@ -0,0 +1,14 @@
+---
+method: d3/d3/mouse
+scope: self
+returns: js/Array
+summary: Find x,y coordinates of the current mouse event relative to a container element.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-d3_mouse
+seealso:
+- d3/Selection/on§set
+- d3/d3/event
+- d3/d3/touches
+params:
+- name: container
+ kind: dom/Element
+ summary: The HTML or SVG container element to find the coordinates relative to.
View
29 methods/d3-d3-select.yaml
@@ -0,0 +1,29 @@
+---
+- method: d3/d3/select§selector
+ scope: self
+ returns: d3/Selection
+ summary: Select an element from the current document.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-d3_select
+ seealso:
+ - d3/d3/select§node
+ - d3/d3/selectAll§selector
+ - d3/d3/selectAll§nodes
+ - d3/Selection/select
+ - d3/Selection/selectAll
+ params:
+ - name: selector
+ kind: js/String
+- method: d3/d3/select§node
+ scope: self
+ returns: d3/Selection
+ summary: Select an element from the current document.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-d3_select
+ seealso:
+ - d3/d3/select§selector
+ - d3/d3/selectAll§selector
+ - d3/d3/selectAll§nodes
+ - d3/Selection/select
+ - d3/Selection/selectAll
+ params:
+ - name: node
+ kind: js/Array
View
30 methods/d3-d3-selectAll.yaml
@@ -0,0 +1,30 @@
+---
+- method: d3/d3/selectAll§selector
+ scope: self
+ returns: d3/Selection
+ summary: Select multiple elements from the current document.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-d3_selectAll
+ seealso:
+ - d3/d3/select§node
+ - d3/d3/select§selector
+ - d3/d3/selectAll§nodes
+ - d3/Selection/select
+ - d3/Selection/selectAll
+ params:
+ - name: selector
+ kind: js/String
+- method: d3/d3/selectAll§nodes
+ scope: self
+ returns: d3/Selection
+ summary: Select multiple elements from the current document.
+ url: https://github.com/mbostock/d3/wiki/Selections#wiki-d3_selectAll
+ seealso:
+ - d3/d3/select§node
+ - d3/d3/select§selector
+ - d3/d3/selectAll§selector
+ - d3/Selection/select
+ - d3/Selection/selectAll
+ params:
+ - name: nodes
+ kind: js/Array
+ summary: May be an array or array-like object (e.g. a [`NodeList`](objjob:dom/NodeList) or [`arguments`](objjob:js/Function/arguments)).
View
14 methods/d3-d3-touches.yaml
@@ -0,0 +1,14 @@
+---
+method: d3/d3/touches
+scope: self
+returns: js/Array
+summary: Find multiple x,y coordinates of the current touch events relative to a container element.
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-d3_touches
+seealso:
+- d3/Selection/on§set
+- d3/d3/event
+- d3/d3/mouse
+params:
+- name: container
+ kind: dom/Element
+ summary: The HTML or SVG container element to find the coordinates relative to.
View
11 methods/d3-d3-transition.yaml
@@ -0,0 +1,11 @@
+---
+method: d3/d3/transition
+scope: self
+returns: d3/Transition
+summary: Start an animated transition.
+url: https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_transition
+seealso:
+- d3/Selection/transition
+params:
+- name: selection
+ kind: d3/Selection
View
5 objects/d3-EnterSelection.yaml
@@ -0,0 +1,5 @@
+---
+object: d3/EnterSelection
+from: js/Array
+summary: Array of placeholder items with special D3 methods.
+url: https://github.com/mbostock/d3/wiki/Selections
View
5 objects/d3-Selection.yaml
@@ -0,0 +1,5 @@
+---
+object: d3/Selection
+from: js/Array
+summary: Array of DOM elements with special D3 methods.
+url: https://github.com/mbostock/d3/wiki/Selections
View
5 objects/d3-Transition.yaml
@@ -0,0 +1,5 @@
+---
+object: d3/Transition
+from: js/Array
+summary: A special type of [selection](objjob:d3/Selection) where the operators apply smoothly over time rather than instantaneously.
+url: https://github.com/mbostock/d3/wiki/Transitions
View
5 objects/d3-d3.yaml
@@ -0,0 +1,5 @@
+---
+object: d3/d3
+from: js/Object
+summary: D3.js namespace object, providing bootstrapping and common methods.
+url: https://github.com/mbostock/d3/wiki/API-Reference
View
6 properties/d3-d3-event.yaml
@@ -0,0 +1,6 @@
+property: d3/d3/event
+scope: self
+kind: events/Event
+summary: The current event (if any). Used for handling events during a callback invoked [`selection.on()`](objjob:d3/Selection/on§set).
+url: https://github.com/mbostock/d3/wiki/Selections#wiki-d3_event
+readonly: true
View
470 selection.yaml
@@ -1,470 +0,0 @@
--
- object: d3/Selection
- from: js/Array
- summary: Array of DOM elements with special D3 methods.
- url: https://github.com/mbostock/d3/wiki/Selections
- methods:
- -
- name: attr§get
- returns: d3/Selection
- summary: Get attribute value.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-attr'
- seealso:
- - d3/Selection/attr§value
- - d3/Selection/attr§func
- params:
- - name: name
- kind: js/String
- -
- name: attr§value
- returns: d3/Selection
- summary: Set attribute value.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-attr'
- seealso:
- - d3/Selection/attr§get
- - d3/Selection/attr§func
- params:
- - name: name
- kind: js/String
- - name: value
- kind: js/String
- summary: Non-string values (e.g. a number like `10`) are coerced to strings before setting.
- -
- name: attr§func
- returns: d3/Selection
- summary: Set attribute value from data.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-attr'
- seealso:
- - d3/Selection/attr§get
- - d3/Selection/attr§value
- params:
- - name: name
- kind: js/String
- - 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.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-classed'
- seealso:
- - d3/Selection/classed§value
- - d3/Selection/classed§func
- params:
- - name: name
- kind: js/String
- -
- name: classed§value
- returns: d3/Selection
- summary: Add/remove a CSS class from the selection.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-classed'
- seealso:
- - d3/Selection/classed§get
- - d3/Selection/classed§func
- params:
- - name: name
- kind: js/String
- - name: addClass
- kind: js/Boolean
- summary: If this parameter is not a boolean it is forced to one.
- -
- name: classed§func
- returns: d3/Selection
- summary: Add/remove a CSS class from the selection based on data.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-classed'
- seealso:
- - d3/Selection/classed§get
- - d3/Selection/classed§value
- params:
- - name: name
- kind: js/String
- - 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.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-style'
- seealso:
- - d3/Selection/style§value
- - d3/Selection/style§func
- params:
- - name: name
- kind: js/String
- -
- name: style§value
- returns: d3/Selection
- summary: Set a CSS style property for elements in the selection.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-style'
- seealso:
- - d3/Selection/style§get
- - d3/Selection/style§func
- params:
- - name: name
- kind: js/String
- - name: value
- kind: js/String
- summary: If this parameter is not a string it is forced to one.
- - name: priority
- kind: js/String
- summary: Either `null` or the string `"important"`.
- optional: true
- -
- name: style§func
- returns: d3/Selection
- summary: Set a CSS style property for elements in the selection based on data.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-style'
- seealso:
- - d3/Selection/style§get
- - d3/Selection/style§value
- params:
- - name: name
- kind: js/String
- - 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 style property. A `null` value will remove the style property"
- - name: priority
- 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.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-property'
- seealso:
- - d3/Selection/property§value
- - d3/Selection/property§func
- - d3/Selection/attr§get
- params:
- - name: name
- kind: js/String
- -
- name: property§value
- returns: d3/Selection
- summary: Set a DOM property for elements in the selection.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-property'
- seealso:
- - d3/Selection/property§get
- - d3/Selection/property§func
- - d3/Selection/attr§value
- params:
- - name: name
- kind: js/String
- - name: value
- kind: js/String
- summary: If this parameter is not a string it is forced to one.
- - name: priority
- kind: js/String
- summary: Either `null` or the string `"important"`.
- optional: true
- -
- name: property§func
- returns: d3/Selection
- summary: Set a DOM property for elements in the selection based on data.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-property'
- seealso:
- - d3/Selection/property§get
- - d3/Selection/property§value
- - d3/Selection/attr§func
- params:
- - name: name
- kind: js/String
- - 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.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-text'
- seealso:
- - d3/Selection/text§value
- - d3/Selection/text§func
- - d3/Selection/html§get
- -
- name: text§value
- returns: d3/Selection
- summary: Set the text content for elements in the selection.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-text'
- seealso:
- - d3/Selection/text§get
- - d3/Selection/text§func
- - d3/Selection/html§value
- params:
- - name: newText
- kind: js/String
- summary: If this parameter is not a string it is forced to one.
- -
- name: text§func
- returns: d3/Selection
- summary: Set the text content for elements in the selection based on data.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-text'
- seealso:
- - d3/Selection/text§get
- - d3/Selection/text§value
- - d3/Selection/html§func
- params:
- - 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.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-html'
- seealso:
- - d3/Selection/html§value
- - d3/Selection/html§func
- - d3/Selection/text§get
- -
- name: html§value
- returns: d3/Selection
- summary: Set the HTML content for elements in the selection.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-html'
- seealso:
- - d3/Selection/html§get
- - d3/Selection/html§func
- - d3/Selection/text§value
- - d3/Selection/append
- - d3/Selection/insert
- params:
- - name: newHTML
- kind: js/String
- summary: If this parameter is not a string it is forced to one.
- -
- name: html§func
- returns: d3/Selection
- summary: Set the HTML content for elements in the selection based on data.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-html'
- seealso:
- - d3/Selection/html§get
- - d3/Selection/html§value
- - d3/Selection/text§func
- params:
- - 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."
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-append'
- seealso:
- - d3/Selection/html§value
- - d3/Selection/insert
- params:
- - 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."
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-insert'
- seealso:
- - d3/Selection/append
- - d3/Selection/html§value
- params:
- - 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: 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.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-data'
- seealso:
- - d3/Selection/data§value
- - d3/Selection/data§func
- -
- name: data§value
- returns: d3/UpdateSelection
- summary: "Set the data array for the selection, computing the update, enter, and exit selections."
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-data'
- seealso:
- - d3/Selection/data§get
- - d3/Selection/data§func
- params:
- - name: dataValues
- kind: js/Array
- - name: keyCalculator
- kind: js/Function
- summary: This function is yielded the values of the array and must return a unique string for each.
- optional: true
- -
- name: data§func
- returns: d3/UpdateSelection
- summary: "Set the data array for the selection based on existing data."
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-data'
- seealso:
- - d3/Selection/data§get
- - d3/Selection/data§value
- params:
- - name: dataCalculator
- kind: js/Function
- - name: keyCalculator
- 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).
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-datum'
- seealso:
- - d3/Selection/datum§value
- - d3/Selection/datum§func
- -
- name: datum§value
- returns: d3/Selection
- summary: Set the data associated with elements in the selection.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-datum'
- params:
- - name: value
- kind: js/Object
- summary: "May be any JavaScript object (number, array, string, DOM element, etc.)"
- seealso:
- - d3/Selection/datum§get
- - d3/Selection/datum§func
- -
- name: datum§func
- returns: d3/Selection
- summary: Set the data associated with elements in the selection based on existing data.
- url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-datum'
- params:
- - name: func
- kind: js/Function
- summary: "This function is invoked for each selected element, being passed the previous datum `d` and the current index `i`, with the `this` context as the current DOM element. The return value of this function is used to set each element's data. A `null` value will delete the bound data."
- 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.
- 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.
- 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.
- details: The elements in the DOM will all be adjacent siblings following the first item after the sort; 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-sort'
- params:
- - name: comparator
- kind: js/Function
- 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)."

No commit comments for this range

Something went wrong with that request. Please try again.