block by mbostock 5977197

DRY Bar Chart

Full Screen

A variation of the example bar chart using a slightly more D.R.Y. style. The visual encoding is represented by two functions and their composition:

Inspired by Andrew Winterman’s post, Tooling for the Lazy Programmer: DRYing up D3.

index.html

data.tsv