diff --git a/app.js b/app.js index 372ee2b..e0a9bce 100644 --- a/app.js +++ b/app.js @@ -30,7 +30,12 @@ yDomain = d3.extent(runs, function(datum, index){ }) yScale.domain(yDomain); -d3.selectAll('circle').data(runs) +d3.select('svg').selectAll('circle') + .data(runs) + .enter() + .append('circle'); + +d3.selectAll('circle') .attr('cy', function(datum, index){ return yScale(datum.distance); }); diff --git a/index.html b/index.html index 0c0058e..c756f85 100644 --- a/index.html +++ b/index.html @@ -6,11 +6,7 @@
- +