Michael Freeman
Building blocks of charts
So what can D3 do?
(and D3 can help)
Appending elements to the page
d3.select('#my-div')
d3.select('#my-div').append('svg')
d3.select('#my-div').append('svg')
.attr('width', 100)
.attr('height', 100)
.style('border', '1px solid black')
// State paths
svg.selectAll("path")
.data(stateShapes)
.enter()
.append('path')
.attr("d", function(d) { return pathGenerator(d)}) // the "d" attribute defines the shape of the path
In which U.S. states were people born?
All you have to do is learn how to arrange elements into charts
(and D3 can help)Michael Freeman
mikefree@uw.edu
@mf_viz
D3 website
S. Murray's Interactive Data Visualization
Reusable charts by NVD3