createHeatmap = function(id) {
let node = createPlot(id);
let svg = d3.select(node);
let plot = svg.select("g#plot");
let rows = plot.selectAll("g.cell")
.data(gasMaps)
.enter()
.append("g");
rows.attr("class", "cell");
rows.attr("id", function(d) { return "block-" + d.block; });
rows.attr("transform", function(d) {
return translate(0, scale.y(d.block - 1));
});
let cells = rows.selectAll("rect")
.data(function(d) { return d.map; })
.enter()
.append("rect");
cells.attr("x", function(d) { return scale.x(d.gasLeft - d.gas); });
cells.attr("y", 0);
cells.attr("width", d => scale.x(d.gas));
cells.attr("height", params.plot.height / (latest - oldest));
cells.append("title").text(function(d) { return (d.gasPrice / 1e9) + " gwei"; });
cells.style("fill", function(d) { return scale.color(d.gasPrice); });
cells.style("stroke", function(d) { return scale.color(d.gasPrice); });
return node;
}