chart = {
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, dimensions.width, dimensions.height]);
const paintings = svg
.selectAll("rect")
.data(data)
.join("rect")
.attr("width", (d) => PaintingScaler(d.width))
.attr("height", (d) => PaintingScaler(d.height))
.attr("x", (d) => xScale(d.x) - PaintingScaler(d.width) / 2)
.attr("y", (d) => yScale(d.y) - PaintingScaler(d.height) / 2)
.attr("opacity", 1);
return svg.node();
}