multiline = Plot.plot({
subtitle: "Top-" + n_sellers + " All-Time Best-Sellers",
width: width,
height: 420,
marginRight: 120,
color: {type: "categorical",
scheme: "Reds",
domain: totalSales.slice(0, n_sellers).map(d => d.name),
legend: "swatches",
reverse: true
},
marks: [
Plot.lineY(pizza, Plot.binX({y: 'sum'}, {
x: "order_date",
y: "orders",
z: "name",
interval: d3.utcWeek,
opacity: n_sellers === 0 ? 1.0 : 0.2,
stroke: n_sellers === 0 ? "Black" : "Gray"
})),
Plot.lineY(pizza, Plot.binX({y: 'sum'}, {
x: "order_date",
y: "orders",
z: "name",
interval: d3.utcWeek,
tip: true,
stroke: "name"
})),
]
})