Plot.plot({
y: {
label: "↑ Percentage of sequenced samples that fall into the category variant",
tickFormat: "%",
},
x:{
label: "2021"
},
marks: [
Plot.ruleY([0]),
Plot.areaY(data, Plot.stackY({
offset: "expand",
x: "parsedDate",
y: "perc_sequences",
fill: "variant",
curve: "basis",
order: "variant"})),
Plot.text(data, Plot.selectFirst(Plot.stackY({
x: "parsedDate",
y: "perc_sequences",
z: "variant",
order: "variant",
offset: "expand",
fill: "#333333",
text: "variant",
fontWeight: "bold",
textAnchor: "start", dx: 15, dy: 5,
}))),
],
color
})