chart = {
const svg = d3.select(DOM.svg(width, height));
svg.append("g").call(xAxis);
svg.append("g").call(yAxis);
const serie = svg
.append("g")
.selectAll("g")
.data([{ key: "gate", dat }])
.enter()
.append("g")
.attr("transform", (d) => `translate(0,${y(d.key) + 1})`);
const tip = d3tip()
.attr("class", "d3-tip")
.html((d, x) => x.residue);
svg.call(tip);
serie
.append("g")
.selectAll("rect")
.data((d) => d.dat)
.enter()
.append("rect")
.attr("fill", (d) => z(d.score))
.attr("x", (d, i) => x(residues[i]))
.attr("y", 0)
.attr("height", y.bandwidth())
.attr("width", x.bandwidth())
.on("mouseover", tip.show)
.on("mouseout", tip.hide);
return svg.node();
}