Closed
Description
Provide a visual warning to users when they specify facet data that doesn't match the mark data. This is especially tricky in the case when the facet and mark data both use the same .filter()
function, for example (notebook here):
Plot.plot({
facet: {
data: aapl.filter(d => d.Close > 1),
y: d => d3.utcFormat("%Y")(d.Date)
},
marks: [
Plot.lineY(aapl.filter(d => d.Close > 1), {x: "Date", y: "Close"})
]
})
The logic I would imagine is:
If there is facet data and there is mark data AND the mark data is not strictly equal to ===
the facet data, provide a warning like Facet data and mark data must be strictly equal for accurate faceting