d3 = {
const d3 = await require("d3@5", "d3-array@2");
d3.selection.prototype.move_to = function({ x = 0, y = 0 }) {
this.each(function(d) {
const x_pos = typeof x === "function" ? x(d) : x;
const y_pos = typeof y === "function" ? y(d) : y;
d3.select(this).attr("transform", `translate(${x_pos},${y_pos})`);
});
return this;
};
return d3;
}