viewof graphResult = {
if (separate) {
return Plot.plot({
grid: true,
x: {
domain: [0, 1]
},
y: {
label: null
},
facet: {
data:selectedRows,
y:groupBy,
},
marks: [
Plot.rectY(selectedRows, Plot.binX({y: "count"}, {x: colToShow, fill: groupBy})),
Plot.ruleY([0])
]
})
} else {
return Plot.plot({
grid: true,
x: {
domain: [0, 1]
},
marks: [
Plot.rectY(selectedRows, Plot.binX({y: "count"}, {x: colToShow, fill: groupBy, mixBlendMode: "multiply"})),
Plot.ruleY([0])
]
})
}
}