binX optionally allows empty groups as a semi-hidden feature via filter: null. groupX and friends do not (as far as I know) have equivalent behavior. This makes sense since it's hard to know all the groups to zero out a priori. But for tip: true if you set (e.g.) x: { domain [...] }, you can get empty groups, and the gaps in interaction model are noticeable.
I could imagine a few solutions to this. One solution is to have an impute or something alongside the reducer APIs in marks like rect and bar. @mbostock suggests that group might take a domain, similar to the behavior of x. I do not have a clear sense of the implications of either change but my view is that something like impute is likely to be more generally useful and less duplicative. The disadvantage is that if you continue down that route you may end up re-implementing Arquero.
binX
optionally allows empty groups as a semi-hidden feature viafilter: null
.groupX
and friends do not (as far as I know) have equivalent behavior. This makes sense since it's hard to know all the groups to zero out a priori. But fortip: true
if you set (e.g.)x: { domain [...] }
, you can get empty groups, and the gaps in interaction model are noticeable.I could imagine a few solutions to this. One solution is to have an
impute
or something alongside the reducer APIs in marks likerect
andbar
. @mbostock suggests thatgroup
might take adomain
, similar to the behavior ofx
. I do not have a clear sense of the implications of either change but my view is that something likeimpute
is likely to be more generally useful and less duplicative. The disadvantage is that if you continue down that route you may end up re-implementing Arquero.