Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Complete selections

  • Loading branch information...
commit 0b9d8563ab34fcc4151ea0201b2d9ff973f51e68 1 parent 0f7b687
Gavin Kistner authored

Showing 1 changed file with 98 additions and 30 deletions. Show diff stats Hide diff stats

  1. +98 30 selection.yaml
128 selection.yaml
@@ -43,8 +43,7 @@
43 43 - name: func
44 44 kind: js/Function
45 45 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."
46   - #--------------------------------------------------------------------------
47   - -
  46 + - #--------------------------------------------------------------------------
48 47 name: classed§get
49 48 returns: js/Boolean
50 49 summary: Check to see if the selection has the specified class.
@@ -83,8 +82,7 @@
83 82 - name: func
84 83 kind: js/Function
85 84 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."
86   - #--------------------------------------------------------------------------
87   - -
  85 + - #--------------------------------------------------------------------------
88 86 name: style§get
89 87 returns: js/String
90 88 summary: Get the computed value of a CSS style property.
@@ -131,8 +129,7 @@
131 129 kind: js/String
132 130 summary: Either `null` or the string `"important"`.
133 131 optional: true
134   - #--------------------------------------------------------------------------
135   - -
  132 + - #--------------------------------------------------------------------------
136 133 name: property§get
137 134 returns: js/String
138 135 summary: Get the value of a DOM property.
@@ -178,8 +175,7 @@
178 175 - name: func
179 176 kind: js/Function
180 177 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."
181   - #--------------------------------------------------------------------------
182   - -
  178 + - #--------------------------------------------------------------------------
183 179 name: text§get
184 180 returns: js/String
185 181 summary: Get the `textContent` for a DOM element.
@@ -214,8 +210,7 @@
214 210 - name: func
215 211 kind: js/Function
216 212 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."
217   - #--------------------------------------------------------------------------
218   - -
  213 + - #--------------------------------------------------------------------------
219 214 name: html§get
220 215 returns: js/String
221 216 summary: Get the `innerHTML` for a DOM element.
@@ -252,8 +247,7 @@
252 247 - name: func
253 248 kind: js/Function
254 249 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."
255   - #--------------------------------------------------------------------------
256   - -
  250 + - #--------------------------------------------------------------------------
257 251 name: append
258 252 returns: d3/Selection
259 253 summary: "Create and append new elements, returning a new selection of them."
@@ -265,8 +259,7 @@
265 259 - name: tagName
266 260 kind: js/String
267 261 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)."
268   - #--------------------------------------------------------------------------
269   - -
  262 + - #--------------------------------------------------------------------------
270 263 name: insert
271 264 returns: js/String
272 265 summary: "Create and insert new elements before existing ones, returning a selection of the new elements."
@@ -281,14 +274,12 @@
281 274 - name: beforeSelector
282 275 kind: js/String
283 276 summary: A selector to find the element to insert the new element before.
284   - #--------------------------------------------------------------------------
285   - -
  277 + - #--------------------------------------------------------------------------
286 278 name: remove
287 279 returns: d3/Selection
288 280 summary: "Remove all elements in the selection from the document; returns the selection."
289 281 url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-remove'
290   - #--------------------------------------------------------------------------
291   - -
  282 + - #--------------------------------------------------------------------------
292 283 name: data§get
293 284 returns: js/Array
294 285 summary: Get the data array for the first group in the selection.
@@ -326,8 +317,7 @@
326 317 kind: js/Function
327 318 summary: This function is yielded the values of the array and must return a unique string for each.
328 319 optional: true
329   - #--------------------------------------------------------------------------
330   - -
  320 + - #--------------------------------------------------------------------------
331 321 name: datum§get
332 322 returns: js/Object
333 323 summary: Return the data associated with the first element in the selection (if any).
@@ -359,27 +349,24 @@
359 349 seealso:
360 350 - d3/Selection/datum§get
361 351 - d3/Selection/datum§func
362   - #--------------------------------------------------------------------------
363   - -
  352 + - #--------------------------------------------------------------------------
364 353 name: enter
365 354 returns: d3/EnterSelection
366 355 summary: Return the array of placeholders for 'missing' elements associated with data.
367   - details: You **must** call [`data()`](objjob://d3/Selection/data) on the selection before this method will be available.
  356 + details: You **must** call [`data()`](objjob:d3/Selection/data) on the selection before this method will be available.
368 357 url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-enter'
369 358 seealso:
370 359 - d3/UpdateSelection/exit
371 360 - d3/Selection/attr§func
372   - #--------------------------------------------------------------------------
373   - -
  361 + - #--------------------------------------------------------------------------
374 362 name: exit
375 363 returns: d3/Selection
376 364 summary: Return the selection of elements no longer associated with data.
377   - details: You **must** call [`data()`](objjob://d3/Selection/data) on the selection before this method will be available.
  365 + details: You **must** call [`data()`](objjob:d3/Selection/data) on the selection before this method will be available.
378 366 url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-exit'
379 367 seealso:
380 368 - d3/UpdateSelection/enter
381   - #--------------------------------------------------------------------------
382   - -
  369 + - #--------------------------------------------------------------------------
383 370 name: sort
384 371 returns: d3/Selection
385 372 summary: Sort the order of elements in the selection (and DOM) according to custom criteria.
@@ -391,8 +378,7 @@
391 378 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."
392 379 seealso:
393 380 - d3/Selection/order
394   - #--------------------------------------------------------------------------
395   - -
  381 + - #--------------------------------------------------------------------------
396 382 name: order
397 383 returns: d3/Selection
398 384 summary: Reorder the elements in the DOM to match the order of elements in the selection.
@@ -400,3 +386,85 @@
400 386 url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-order'
401 387 seealso:
402 388 - d3/Selection/sort
  389 + - #--------------------------------------------------------------------------
  390 + name: on§get
  391 + returns: d3/Selection
  392 + summary: Retrieve the event listener for an event type.
  393 + url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-on'
  394 + seealso:
  395 + - d3/Selection/on§set
  396 + params:
  397 + - name: eventName
  398 + kind: js/String
  399 + summary: "Name of the event, e.g. 'click' or 'mouseover'."
  400 + -
  401 + name: on§set
  402 + returns: d3/Selection
  403 + summary: Retrieve the event listener for an event type.
  404 + url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-on'
  405 + seealso:
  406 + - d3/Selection/on§get
  407 + - d3/event
  408 + params:
  409 + - name: eventName
  410 + kind: js/String
  411 + 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'."
  412 + - name: eventHandler
  413 + kind: js/Function
  414 + 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."
  415 + - name: capturePhase
  416 + kind: js/Boolean
  417 + summary: "Corresponds to the [W3C useCapture flag](http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration)."
  418 + - #--------------------------------------------------------------------------
  419 + name: transition
  420 + returns: d3/Selection
  421 + summary: Start a new [`Transition`](objjob:d3/Transition) for the selection.
  422 + url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-transition'
  423 + seealso:
  424 + - d3/Transition
  425 + - #--------------------------------------------------------------------------
  426 + name: select§value
  427 + returns: d3/Selection
  428 + summary: Find the first descendant elements of the selection matching a selector.
  429 + url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-select'
  430 + seealso:
  431 + - d3/Selection/select§func
  432 + - d3/Selection/selectAll§value
  433 + params:
  434 + - name: selector
  435 + kind: js/String
  436 + -
  437 + name: select§func
  438 + returns: d3/Selection
  439 + summary: Use a function to select a different element for each entry in the selection.
  440 + url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-select'
  441 + seealso:
  442 + - d3/Selection/select§value
  443 + - d3/Selection/selectAll§func
  444 + params:
  445 + - name: selectCalculator
  446 + kind: js/Function
  447 + 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`."
  448 + - #--------------------------------------------------------------------------
  449 + name: selectAll§value
  450 + returns: d3/Selection
  451 + summary: Select multiple elements for each entry in the selection.
  452 + url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-selectAll'
  453 + seealso:
  454 + - d3/Selection/selectAll§func
  455 + - d3/Selection/select§value
  456 + params:
  457 + - name: selector
  458 + kind: js/String
  459 + -
  460 + name: selectAll§func
  461 + returns: d3/Selection
  462 + summary: Use a function to select multiple elements for each entry in the selection.
  463 + url: 'https://github.com/mbostock/d3/wiki/Selections#wiki-select'
  464 + seealso:
  465 + - d3/Selection/selectAll§value
  466 + - d3/Selection/select§func
  467 + params:
  468 + - name: selectCalculator
  469 + kind: js/Function
  470 + 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.
Something went wrong with that request. Please try again.