Plot.plot({
height: 950,
x: {
axis: null,
padding: 0
},
y: {
padding: 0,
tickFormat: Plot.formatWeekday("en", "narrow"),
tickSize: 0
},
fy: {
reverse: false
},
facet: {
data: mostLovedBlocks,
y: (d) => d.createdAt.getUTCFullYear()
},
color: {
type: "log",
scheme: "RdPu"
},
marks: [
Plot.cell(mostLovedBlocks, {
x: (d) => d3.utcWeek.count(d3.utcYear(d.createdAt), d.createdAt),
y: (d) => d.createdAt.getUTCDay(),
fill: "love",
title: (d) =>
`${d.description} by ${d.userId}\nLoved: ${d.love}\nForks: ${d.forks}\nStars: ${d.stars}`,
inset: 0.5
})
]
})