Slide 1

Slide 1 text

A Five-Minute Intro D3.js

Slide 2

Slide 2 text

BIND SOME DATA Select a set of elements and associate them with a data set

Slide 3

Slide 3 text

Data can be as simple as an array of numbers... DATA? Or more complex JSON objects

Slide 4

Slide 4 text

USE THE ENTER() SELECTION For each element in the data set, we append a new circle to the initially-empty selection

Slide 5

Slide 5 text

MAKE THE DATA PRETTY Use .attr to set attributes arbitrarily, or based on values from the data object bound to each element

Slide 6

Slide 6 text

MAKE THINGS FIT Scales map values from an input domain to an output range

Slide 7

Slide 7 text

MAKE THINGS MOVE Use transition() to change attributes of an element over time