From 93fa1aec9a68ac45b15d37b76686c02013b5e389 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Sun, 10 Sep 2017 14:30:34 -0400 Subject: [PATCH] bottom axis --- app.css | 2 +- app.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app.css b/app.css index 8005eea..1a0423a 100644 --- a/app.css +++ b/app.css @@ -3,5 +3,5 @@ circle { fill: black; } svg { - border: 1px solid black; + overflow: visible; } diff --git a/app.js b/app.js index e0a9bce..d90c7b2 100644 --- a/app.js +++ b/app.js @@ -52,3 +52,9 @@ d3.selectAll('circle') .attr('cx', function(datum, index){ return xScale(parseTime(datum.date)); }); + +var bottomAxis = d3.axisBottom(xScale); +d3.select('svg') + .append('g') + .call(bottomAxis) + .attr('transform', 'translate(0,'+HEIGHT+')');