heatMap = {
const chart = await vegalite({
mark: {type: "rect"},
data: {name: "values", values: transform(data) },
encoding: {
x: {
field: "col",
type: "nominal",
axis: { labelAngle: 0, title: null, orient: "top"},
sort: Object.keys(data[0])
},
y: { field: "row", type: "nominal", axis: null},
color: { field: "value", type: "nominal", sort: ["Not Missing", "Missing"], legend: {title: null, orient: "top"}}
},
width: {step: 100},
height: {step: 1}
})
return html`<div style="overflow: auto; height: ${height}px">${chart}</div>`
}