plot
plot copied to clipboard
Using a channel of named symbols doesn't work with tips
Plot.dot(
penguins,
Plot.dodgeY({
x: "culmen_length_mm",
symbol: (d) => (d.sex === "FEMALE" ? "square" : "star"),
tip: true
})
).plot({ height: 220 })
The [Object object] is the {draw: function} that corresponds to the symbol. Maybe it should just have a toString?
This is similar to a literal color channel. Perhaps the tip should ignore literal symbol channels too, since showing it again in the tip won’t help interpretation. The more idiomatic approach would be to define the channel as “sex” and then specify the domain and range of the symbol scale.