This message was deleted.
# help
s
This message was deleted.
a
I do see from the docs that:
By default, empty groups are omitted, and non-empty groups are generated in ascending (natural) order.
But I can’t find where it says how to change this…
m
I don’t think there’s a way to do this currently. Setting filter: null works for the bin transform because the domain is quantitative or temporal, so we know where the missing values are. The same isn’t true with an ordinal domain for the group transform; the transform can only see values that exist and are therefore non-empty. I think we could do this if we allowed the group transform to take a domain option, enumerating all the expected (and allowed) values; the group transform would ignore anything outside the domain. We could perhaps also allow the interval option to compute the domain from a continuous extent (e.g., days or integers). You’re welcome to file a feature request, or I can try to remember to do that tomorrow. Thanks for the suggestion!
❤️ 1
(You can set the domain of the x or y or color scale to show empty groups. But there’s no way to draw a zero for empty groups, say.)
a
@Mike Bostock Would you prefer the feature request in the GitHub Issues, or somewhere else? Happy to do this however you’d like.
Happy to also provide more context, e.g., “we’d like
tip: true
to work for empty buckets”, etc.
a
🙂 Hi Alex! Thank you for surfacing this issue. It would be terrific if you could add it to our feedback repo: https://github.com/observablehq/feedback/issues It's always great for us to read as much motivating and clarifying context as you'd like to offer. ❤️
m
For Plot specifically I would prefer here https://github.com/observablehq/plot/issues but if it involves the Observable platform more generally then the feedback repo as Aaron suggested.
❤️ 1
a
oop
I can close it and move it.
🙏🏻 1
Ok I closed that and re-filed here: https://github.com/observablehq/plot/issues/1695
In addition to the suggestion that
group
take a
domain
I suggested you might add an
impute
to marks with reducers like
rect
and
bar
. But I am not familiar enough with the API to know how clsoe this is to the API aesthetic.
er
actually sorry,
group
has the reducer.
so it might have the
impute
. anyway you get the idea.
m
Thanks for filing the issue! 🙏
a
Thank you also for refiling! Apologies for initially leading you astray 🤦