pic = {
let svg = d3.create("svg").attr("width", size.w).attr("height", size.h);
let g = svg
.append("g")
.attr("transform", `translate(${size.margin}, ${size.margin})`);
let links = root.links();
g.append("g")
.attr("id", "links")
.selectAll("path")
.data(root.links())
.join("path")
.attr("d", diagonal)
.attr("fill", "none")
.attr("stroke", "#555")
.attr("stroke-opacity", 0.4)
.attr("stroke-width", 1.5);
let nodes = root.descendants();
g.append("g")
.selectAll("circle")
.data(root.descendants())
.join("circle")
.attr("cx", (d) => (size.w > size.size_break ? d.y : d.x))
.attr("cy", (d) => (size.w > size.size_break ? d.x : d.y))
.attr("r", 4 * (size.w / 1000) ** 0.5)
.attr("fill", "black");
return svg.node();
}