I have already read these answers, but I wasn't able to solve:
Adapt old geo to D3 v5, how to express a queue of Promise?
d3.js v5 - Promise.all replaced d3.queue
My code in d3 v4 looks like
d3.queue()
.defer(d3.json, "path/file.json")
.defer(populate,map,data)
.await(ready);
}
function populate(map,data,callback) {
.. code ..
callback(null);
}
function ready(error, topo) {
.. code ..
}
I would like to replace this with Promise