Plot.plot({
y: {
label: null
},
fy: {
label: null
},
color: {
domain: ["read", "write"],
range: ["#e41a1c", "#4daf4a","#941a1c", "#4d8f4a"],
legend: true
},
marks: [
Plot.barX(
storage,
{
x: (d) => (d.type.substring(0,5) === "write" ? 1 * d.iops : -1 * d.iops),
fy: "mode",
y: "name",
fill: "type",
tip: true
}
),
Plot.axisX({anchor: "top", tickFormat: Math.abs,label: "4k sequence read/write", labelAnchor: "center",labelArrow: "none", }),
Plot.axisX({anchor: "bottom", tickFormat: Math.abs,label: null, }),
Plot.ruleX([0])
]
})