Skip to content

Instantly share code, notes, and snippets.

@arcanis
Created June 20, 2014 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arcanis/83dc04ccf211a27291d0 to your computer and use it in GitHub Desktop.
Save arcanis/83dc04ccf211a27291d0 to your computer and use it in GitHub Desktop.
barDemo.selectAll("rect").
data(data).
enter().
append("svg:rect").
attr("x", function(datum, index) { return x(index); }).
attr("y", function(datum) { return height - y(datum.books); }).
attr("height", function(datum) { return y(datum.books); }).
attr("width", barWidth).
attr("fill", "#2d578b");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment