ourChart = {
const width = 928;
const height = 600;
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.attr("width", width)
.attr("height", height)
.attr("style", "max-width: 100%; height: auto;");
let boxes = svg
.selectAll("path")
.data(ourMethodDots.boxes)
.join("path")
.attr("transform", `translate(100 420)`)
.attr("d", (d) => boxPath(d))
.style("fill", "none")
.style("stroke", "#444")
.attr("stroke-dasharray", "4 2");
let g = svg
.selectAll("g")
.data([ourMethodDots.dots])
.join("g")
.attr("fill-rule", "evenodd")
.attr("transform", (d, i) => `translate(${100 + i * 150} 400)`);
g.selectAll("path.house")
.data((d) => d)
.join("path")
.classed("house", "true")
.attr(
"d",
"M 8 18 L 12 18 L 12 14 L 14 14 L 14 18 L 20 18 L 20 10 L 22 10 L 14 4 L 6 10 L 8 10 Z"
)
.attr("transform", (d) => `translate(${d.y * 22}, ${-d.x * 22})`)
.attr("fill", (d) => colours[d.colour]);
g.append("text")
.text((d) => d.place)
.style("fill", "black")
.attr("y", 40);
return svg.node();
}