Plot.plot({
color: {
domain: ["positive", "negative"],
range: ["steelblue", "orange"]
},
marks: [
Plot.barY(usemployment, {
x:'month',
y:'nonfarm_change',
fill: d => d.nonfarm_change > 0 ? "positive" : "negative",
stroke: d => d.nonfarm_change > 0 ? "positive" : "negative"
}),
Plot.ruleY([0])
],
x: {
ticks: d3.utcYear.range(...d3.extent(usemployment, (d) => d.month)),
tickFormat: "%Y"
}
})