diff --git a/public/js/app.js b/public/js/app.js new file mode 100644 index 0000000..39c09e2 --- /dev/null +++ b/public/js/app.js @@ -0,0 +1,19 @@ +var WIDTH = 800; +var HEIGHT = 500; + +d3.select('svg') + .attr('width', WIDTH) + .attr('height', HEIGHT); + +d3.json('/runs', function(error, data){ + d3.select('svg').selectAll('circle') + .data(data) + .enter() + .append('circle') + .attr('r', 5) + .attr('cx', function(datum, index){ + console.log(datum); + //console.log(index); + return index*100; + }); +});