chart = {
const context = DOM.context2d(900, 500);
const path = d3.geoPath(projection, context);
function render() {
context.clearRect(0, 0, 900, 500);
context.beginPath(), path(graticule), context.strokeStyle = "#ccc", context.stroke();
context.beginPath(), path(land), context.fillStyle = "#000", context.fill();
context.beginPath(), path(sphere), context.strokeStyle = "#000", context.stroke();
return context.canvas;
}
return d3.select(context.canvas)
.call(drag(projection).on("drag.render", render))
.call(render)
.node();
}