This message was deleted.
# help
s
This message was deleted.
m
in these minimal reproductions,
areaY
just doesn't seem to want to respect
it gets somewhat weirder when the cardinality of
fill
gets high*
reverse: true
I think reverses just the color legend domain, but not the area stacking order
anyway, this feels like a bug: would someone be able to confirm that I'm not holding the interface wrong somehow?
m
The problem is that the reverse option is also used for the built-in sort transform (to reverse the mark index), and hence it takes effect before the bin transform rather than being interpreted as an option to the stack transform. If you want to pass it to the stack transform, you need to call Plot.stackY explicitly and pass {reverse: true} as the first argument:
Copy code
Plot.areaY(data, Plot.stackY({reverse: true}, Plot.binX({y: "count"}, …)))
m
ah, brilliant, thanks @Mike Bostock! I had a feeling that perhaps the
reverse
was in the wrong spot, completely forgot that there was a
reverse
in the sort transform too
🙏 1