Plot.plot({
facet: { data, y: "parameter", marginLeft: 70 },
marks: [
Plot.areaY(
data,
Plot.binX(
{ y: "sum" },
{
x: "date",
y: "count",
sort: "date",
curve: "step",
empty: true,
thresholds: d3.utcDay,
fill: "#f2f2fe"
}
)
),
Plot.line(
data,
Plot.binX(
{ y: "sum" },
{
x: "date",
y: "count",
sort: "date",
curve: "step",
empty: true,
thresholds: d3.utcDay
}
)
),
Plot.ruleY([0])
],
x: { domain: [new Date(2020, 0, 1), new Date(2021, 4, 20)] },
fy: { paddingInner: 0.3 },
y: { axis: null },
height: 300,
marginLeft: 70,
width
})