You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if in addition to this equality check, we could provide a generic facet option, which if set to false would disable faceting for the mark. (I don’t think you’d be able to set it to true if the data is different that the facet, but maybe that would be okay if it has the same cardinality?)
The current API is nice in its simplicity, but it's not completely satisfying. For instance, it would be very useful to have a way to facet multiple sources—joining them in a single data array then filtering them again as I did in the SPLOM example is a bit "heavy".
(I don’t think you’d be able to set it to true if the data is different that the facet, but maybe that would be okay if it has the same cardinality?)
That would be the most pressing use-case for me, but it's true we can't guarantee that it won't surprise people if they do, for example, some kind of filtering on the data and receive an error instead of what the intuition says (^^).
I'd also like to pass the facet's value in the marks' render.
^^: intuition says that if I have facet {data: data} and Plot.mark(data.filter(filter), {facet: true…}), then Plot should somehow magically use indexOf to facet the mark. But that might be too prone to errors, and too slow.
Currently we rely on the equality operator to determine whether to facet marks:
plot/src/facet.js
Line 41 in 650529a
I wonder if in addition to this equality check, we could provide a generic facet option, which if set to false would disable faceting for the mark. (I don’t think you’d be able to set it to true if the data is different that the facet, but maybe that would be okay if it has the same cardinality?)
In other words, instead of
you’d say
(Though, the former would still work…)
The text was updated successfully, but these errors were encountered: