{
const svg = d3.select(DOM.svg(width, data.height)).attr("background-color", "#dfe2eb");
const centerX = width / 2;
const centerY = data.height / 2;
const radius = getRadius(data.height, width, data.countBefore);
const grouping = svg.append("g")
.attr("transform", "translate(" + centerX + "," + centerY + ")");
grouping.selectAll("polygon")
.data(getNCoords(data.countBefore, radius))
.enter()
.append("polygon")
.attr("points", (d) => getHexPositions(d[0], d[1], radius).map(item => item.join(",")).join(" "))
.attr("class", (_, i) => i > data.countAfter ? "hex-remove" : "hex-keep")
.attr("stroke", hexStroke)
.attr("fill", hexFill);
grouping.selectAll("polygon.hex-remove")
.transition()
.ease(d3.easeQuad)
.duration(3000)
.delay(3000)
.style("opacity", 0.1)
.attr("stroke", hexFill);
return svg.node()
}