Plot.plot({
x: { interval: "day" },
marks: [
Plot.barY(downloads, {
x: "date",
y: "downloads",
fill: "lime",
inset: 0.5
}),
Plot.areaY(downloads, {
x: "date",
y: "downloads",
stroke: "#000",
interval: {
floor: d3.utcDay.floor,
offset: d3.utcDay.offset,
range: (d, e) =>
d3.utcDay.range(
d3.utcDay.offset(d3.utcDay(d), -1),
d3.utcDay.offset(d3.utcDay(e), +1)
)
},
fill: "#ccc",
fillOpacity: 0.9,
curve: "step"
}),
Plot.ruleY([0])
]
})