From e84ad3f390fc1dbcc4d9614f2a4c4e5b9ab30b02 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Sat, 21 Jul 2018 19:40:40 -0400 Subject: [PATCH] touch-ups to match lesson --- app.js | 15 ++++++++------- index.html | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index 3184220..207b61b 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,5 @@ -var width = 960, - height = 490; +var width = 960; +var height = 490; d3.select('svg') .attr('width', width) @@ -7,12 +7,13 @@ d3.select('svg') var worldProjection = d3.geoEquirectangular(); -var geoPath = d3.geoPath() - .projection(worldProjection); - d3.select('svg').selectAll('path') .data(map_json.features) .enter() .append('path') - .attr('fill', '#099') - .attr('d', geoPath) + .attr('fill', '#099'); + +var dAttributeFunction = d3.geoPath() + .projection(worldProjection); + +d3.selectAll('path').attr('d', dAttributeFunction); diff --git a/index.html b/index.html index af1910c..06f2ecc 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - +