Closed
Description
We're sometimes seeing "high cardinality" warnings when in fact the cardinality is not so high.
Here's a slightly contrived example (simplified down from a real-life use case):
Plot.plot({
height: 200,
marks: [
Plot.frame(),
Plot.lineY(aapl.slice(0, 9), {
x: "Date",
y: "Close",
stroke: (d) => d.Date.getUTCDay(),
fy: (d) => d.Date.getUTCDay(),
marker: true
})
]
})
Here we have 5 facets, four of which have 2 data points, and the last one has 1—which triggers the warning.
we should probably check that G.size is greater than, say, 10, before warning:
https://github.com/observablehq/plot/blob/df3a3add051049986c029fdad727bd64c929e622/src/style.js#L255-257
“high cardinality” is also tested in Plot.auto, I think.