Plot.plot({
height: 300,
marginLeft: 100,
x: {grid: true, tickFormat: d3.format("~s")},
margin: 10,
marks: [
Plot.barX(status, {y: "订单状态", x: "订单量", fill: "#2a78d6", tip: true}),
Plot.text(status, {
y: "订单状态", x: "订单量", text: d => d3.format(",")(d.订单量),
anchor: "end", dx: -6, fill: "white", fontSize: 12
})
]
})