chart = {
const height = 710;
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.attr("width", width)
.attr("height", height)
.attr("style", "max-width: 100%; height: auto;");
var squareSize = 6;
var padding = 2;
const puzzles = svg
.selectAll(".row")
.data(data)
.enter()
.append("g")
.attr("class", "row")
.attr("transform", (d, i) => `translate(0, ${i * (squareSize + padding)})`);
const squares = puzzles
.selectAll(".square")
.data((d) => Object.values(d))
.enter()
.append("rect")
.attr("class", (d) => `square ${d}`)
.attr("x", (d, i) => i * (squareSize + padding))
.attr("width", squareSize)
.attr("height", squareSize)
.attr("cell-index", (d) => d)
.attr("grid-section", (d) => getSudokuSection(d))
.attr("fill", (d) => {
console.log(d);
return timesScale(d);
})
.attr("display", (d) => (d === null ? "none" : "block"));
return svg.node();
}