A histogram script written in javascript (ripped and made atomic from d3.js)