block by nstrayer 776ca46537c557e59b994aa439fdb26c

Reusable D3 Histograms

Full Screen

A fork of the code from @ejb ‘s block for his blog post “A better way to structure D3 code”.

Code for the histogram itself was heavily borrowed from this bl.ock by Mike Bostock.

Takes data in the form of a vector of numerical values.

Also see my second visualization using @ejb’s style: the dotplot.

This is part of my larger project of making a d3/r library for dynamic and interactive basic statistical plots.

index.html

chart.js