From 603108efe66adde2230b1ea72bf56f4fe4bc1e7c Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 24 Aug 2016 10:30:35 -0400 Subject: [PATCH] app.js created --- public/js/app.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 public/js/app.js 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; + }); +});