It’s the filter that is causing the problem.
If there are inline, like this
facet: {
data: barley.filter(d => d.site === 'Grand Rapids'),
x: "year",
},
marks: [
Plot.frame(),
Plot.barX(barley.filter(d => d.site === 'Grand Rapids'),
It doesn’t work.
but if the data is filtered in its own cell then it works.
},
facet: {
data: barle,
x: "year",
},
marks: [
Plot.frame(),
Plot.barX(barle,
Not sure why that is as they both represent the same array of data.