Plot.plot({
height: 420,
axis: null,
width,
color: {
type: "diverging-log",
scheme: "piyg"
},
marks: [
Plot.cell(states, { x: "x", y: "y", fill: (d) => d.change }),
Plot.text(states, { x: "x", y: "y", text: "key", dy: -14 }),
Plot.text(states, {
x: "x",
y: "y",
text: "product_name",
dy: 0,
fontSize: 9
}),
Plot.text(states, {
x: "x",
y: "y",
text: formatChange,
dy: 12,
fillOpacity: 0.6
})
]
})