Plot.plot({
width: 800,
title: "Sample Sales vs Profit",
marks: [
Plot.barY(data, {
x: "Area",
y: "Sales",
sort: { x: "y", reverse: true }
}),
Plot.barY(data, {
x: "Area",
y: "Profit",
sort: { x: "y", reverse: true },
fill: "red"
}),
Plot.ruleX([0])
]
})