svg = {
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.style("background-color", "#f4f4ff");
const g = svg.append("g");
const zoomed = ({ transform }) => {
g.attr("transform", transform);
};
svg.call(
d3
.zoom()
.extent([
[0, 0],
[width, height]
])
.scaleExtent([0.3, 30])
.on("zoom", zoomed)
);
const gT = svg.append("g");
return { svgN: svg.node(), g: g, gT: gT };
}