Skip to content

Instantly share code, notes, and snippets.

@victormejia
Created November 2, 2015 04:43
Show Gist options
  • Save victormejia/78389731908014563b1f to your computer and use it in GitHub Desktop.
Save victormejia/78389731908014563b1f to your computer and use it in GitHub Desktop.
// var data = [
// {
// "browser":"Chrome",
// "value": "45"
// },
// {
// "browser":"Safari",
// "value":"12"
// },
// {
// "browser":"Firefox",
// "value":"18"
// },
// {
// "browser":"IE",
// "value":"25"
// }
// ];
d3.json('/data/browser.json', function(err, data) {
d3.select('#data-binding')
.selectAll('p')
.data(data)
.enter()
.append('p')
.text(function(d) {
return d.browser + ' ' + d.value;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment