function heatmap(data, domain, title) {
return vl.markRect()
.encode(
vl.x().fieldO("series").scale({domain: domain}).title("Snapshots"),
vl.y().fieldO("feature").title("Feature"),
vl.color().average("importance").scale({type: "sqrt", scheme: "blueorange", domainMid: 0, domainMin: -1, domainMax: 1}).legend({orient: "bottom", title: "Importance"}),
vl.column().fieldO("test").header({labelFontWeight: "bold", title: null}),
)
.data(data)
.config({view: {stroke: null, step: 10}})
.title({text: title, anchor: "middle", fontSize: 16, dy: -20})
.render();
}