D3.js: A Five-Minute Intro

D3.js: A Five-Minute Intro

Presented to the @fullscreen Data Club :)

49eec51ef4a3335cb3247a41d1f08971?s=128

Jay Stakelon

July 18, 2013
Tweet

Transcript

  1. A Five-Minute Intro D3.js

  2. BIND SOME DATA Select a set of elements and associate

    them with a data set
  3. Data can be as simple as an array of numbers...

    DATA? Or more complex JSON objects
  4. USE THE ENTER() SELECTION For each element in the data

    set, we append a new circle to the initially-empty selection
  5. MAKE THE DATA PRETTY Use .attr to set attributes arbitrarily,

    or based on values from the data object bound to each element
  6. MAKE THINGS FIT Scales map values from an input domain

    to an output range
  7. MAKE THINGS MOVE Use transition() to change attributes of an

    element over time