Open mbostock opened 3 years ago
Example workaround using map and cumsum: https://observablehq.com/d/cc6eeed33e366ce8
Plot.plot({
marks: [
Plot.areaY(movies, Plot.mapY("cumsum", Plot.groupX({y: "count"}, {x: "IMDB Rating"}))),
Plot.ruleY([0])
]
})
I think the group transform could support a cumulative option, as the bin transform does. It’s less rarely needed since group is sometimes used with a categorical dimension, but it should make sense with an ordinal dimension.