d3
.select(html`<svg width=100 height=100>`)
.call((svg) =>
svg
.selectAll("circle")
.data(d3.cross(d3.range(10), d3.range(10)))
.join("circle")
.attr("transform", ([i, j]) => `translate(${i * 10},${j * 10})`)
.attr("cx", 5)
.attr("cy", 5)
.attr("r", 2.5)
.style("fill", ([i]) => (i <= 4 ? "green" : "red"))
)
.node()