chart1 = {
const width = 960;
const height = 500;
const bandwidth = 10;
const n = 47;
const svg = d3.create("svg").attr("height", height).attr("width", width);
svg
.append("g")
.selectAll("rect")
.data(d3.range(n))
.join("rect")
.attr("width", width)
.attr("height", 10)
.attr("x", 0)
.attr("y", (d) => d * 20)
.attr("mask", "url(#triangleMask)");
svg
.append("g")
.selectAll("rect")
.data(d3.range(n))
.join("rect")
.attr("width", 10)
.attr("height", height)
.attr("x", (d) => d * 20)
.attr("y", 0)
.attr("mask", "url(#triangleMask2)");
const mask = svg.append("mask").attr("id", "triangleMask");
const maskRect = mask
.append("rect")
.attr("width", width)
.attr("height", height)
.attr("fill", "black");
const triangle = mask
.append("path")
.attr("d", d3.symbol().type(d3.symbolTriangle).size(60000))
.attr("transform", `translate(${width / 2}, ${height / 2})`)
.attr("fill", "white");
const mask2 = svg.append("mask").attr("id", "triangleMask2");
const maskRect2 = mask2
.append("rect")
.attr("width", width)
.attr("height", height)
.attr("fill", "white");
const circle2 = mask2
.append("path")
.attr("d", d3.symbol().type(d3.symbolTriangle).size(60000))
.attr("transform", `translate(${width / 2}, ${height / 2})`)
.attr("fill", "black");
return svg.node();
}