Plot.plot({
marginLeft: 90,
marks: [
Plot.barX(
congress,
Plot.groupY(
{ x: "count" },
{ fill: "gender", y: "party", sort: { y: "x", reverse: true } }
)
),
Plot.text(
congress,
Plot.stackX(
Plot.groupY({ x: "count", text: "count" }, { z: "gender", y: "party" })
)
)
]
})