Skip to content

Instantly share code, notes, and snippets.

@tenntenn
Created December 4, 2012 08:48
Show Gist options
  • Save tenntenn/4201924 to your computer and use it in GitHub Desktop.
Save tenntenn/4201924 to your computer and use it in GitHub Desktop.
chart.js
var data = [10, 20, 30, 40];
var chart = d3.select('#chart');
chart.selectAll("div")
.data(data)
.enter()
.append("div")
.style("width", function(d) {
return d * 10 + "px";
}).text(function(d) {
return d;
});​
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment