Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a channel of named symbols doesn't work with tips #2237

Open
Fil opened this issue Nov 16, 2024 · 1 comment · May be fixed by #2239
Open

Using a channel of named symbols doesn't work with tips #2237

Fil opened this issue Nov 16, 2024 · 1 comment · May be fixed by #2239
Labels
bug Something isn’t working

Comments

@Fil
Copy link
Contributor

Fil commented Nov 16, 2024

Image

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?

@Fil Fil added the bug Something isn’t working label Nov 16, 2024
@mbostock
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants