sc3/26thandcalifornia — pull request #9 by derekeder (2013-01-25 20:57:28+00:00)
Title: d3 example histograms

Hooked up the d3 library and added 2 histogram examples:

In app.js, control them via commenting/uncommenting this code:

var histogram_page = new HistogramView({collection: inmate_collection});
router.on('route:histogram', function() {
//simple example 1
//histogram_page.render();

//simple example 2
histogram_page.render_advanced();
});

example 1 reads in array of numbers and draws a horizontal bar chart in SVG

example 2 reads in a json file (can easily be replaced by an API call) and draws a vertical bar chart with named labels.

Cheers!
Derek