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

bind='legend' selector won't respond to click #6347

Closed
makmanalp opened this issue Apr 17, 2020 · 2 comments
Closed

bind='legend' selector won't respond to click #6347

makmanalp opened this issue Apr 17, 2020 · 2 comments

Comments

@makmanalp
Copy link

coming here from: vega/vega-embed#351

Reproduced this in the latest version of jupyterlab as well as the online editor:Open the Chart in the Vega Editor

expected behavior: clicking legend updates selection
actual behavior: selection / selectorxyz_store and chart seems unresponsive

@makmanalp
Copy link
Author

For folks running into this: I was able to work around this by making a mini chart with mark_bar and only a y axis to form legend-like squares, adding the selection to that too, and then concatenating that to the left of my chart to look like a legend.

@arvind arvind removed the Bug 🐛 label Jan 6, 2021
@arvind
Copy link
Member

arvind commented Jan 6, 2021

Hi @makmanalp, apologies for the slow response here. This doesn't look like a bug. When a selection is bound to a legend, the selection's field/encoding should match the legends. For your spec, the legend corresponds to the color channel and field. So, if we switch "fields": ["keyspace"] to "fields": ["color"] instead, clicking the legend works as expected. Hope that helps!

@arvind arvind closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants