Center a map: d3

Center a map: d3
0

#1

I want to center a map. This is the code

let path = d3.geoPath();

As I’m not using any projection, therefore, I don’t know how to do that without a projection. With a projection it would be like this:

let projection = d3.geoAlbers().translate([w/2, h/2]);
let path = d3.geoPath(projection);