Closed
Description
The Plot.text mark here crashes:
Plot.plot({
height: 600,
grid: true,
facet: {
data: penguins,
x: "sex",
y: "species",
marginRight: 80
},
marks: [
Plot.frame(),
Plot.dot(penguins, {facet: "exclude", x: "culmen_depth_mm", y: "culmen_length_mm", r: 2, fill: "#ddd"}),
Plot.dot(penguins, {x: "culmen_depth_mm", y: "culmen_length_mm"}),
Plot.text(d3.union(penguins.map((d) => d.sex)), {fx: (d) => d, x: null, fill: "red"})
]
})
The crash occurs computing excludeIndex
because the index
is sparse, containing undefined entries: