Scaling d3 v4 map to fit SVG (or at all)
问题 I am trying to make this map of the us scale smaller. Either to my SVG, or even manually. This is my code in its simplest from: function initializeMapDifferent(){ var svg = d3.select("#map").append("svg") .attr("width", 1000) .attr("height", 500); d3.json("https://d3js.org/us-10m.v1.json", function (error, us){ svg.append("g") .attr("class", "states") .selectAll("path") .data(topojson.feature(us, us.objects.states).features) .enter().append("path") .attr("fill", "gray") .attr("d", d3.geoPath(