Plot.plot({
marks: [
Plot.barY(pizzaorders, Plot.groupX({y: "sum"}, {x: "day_of_week", y: "orders", fill: "state"})),
Plot.ruleY([0])
],
y: {
label: "↑ Orders (x 1000)",
grid: true,
transform: d => d / 1000
},
color: {
legend: true
},
marginLeft: 50
})