Upgrade to Pro — share decks privately, control downloads, hide ads and more …

D3.js: A Five-Minute Intro

D3.js: A Five-Minute Intro

Presented to the @fullscreen Data Club :)


Jay Stakelon

July 18, 2013

More Decks by Jay Stakelon

Other Decks in Programming


  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