This message was deleted.
# help
s
This message was deleted.
p
There's a near identical usage here that works as I would expect https://observablehq.com/d/7ef728a12d540472#cell-186
ordersByDateStateType
is a shorter list with less data per row, but I wouldn't think that would affect how
facet
works
m
In order for Facet to work, the data needs to be the same as was passed to the plot marks. Since you are filtering the data, it isn't the same anymore. Instead you can pass a
fy
channel to the mark
Copy code
{
  x: (d) => new Date(d.orderDate),
  y: "orders",
  stroke: "pizzaType",
  fy: "state"
}
p
Aha 👍 thanks!
m
oh, actually it's even simpler than that
you are passing
facet
an object (which is correct). That object can have channels, like x or y, and it also needs a
data
key. Like this:
Copy code
facet: {
  data: ordersByDateStateType,
  y: "state"
},
p
Oh 🤦 just realized need to use
data
as prop name in facet yeah
m
i think your original approach would have worked, though
fy
is still a nice trick