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

Register Click for Entire Chart Object #8

Open
Murtz5253 opened this issue Nov 17, 2020 · 4 comments
Open

Register Click for Entire Chart Object #8

Murtz5253 opened this issue Nov 17, 2020 · 4 comments

Comments

@Murtz5253
Copy link

Is there any way to use this package to register a click for an entire chart object? I am building an app using Streamlit, and I want my user to be able to select from a choice of charts, and I want to record the selected chart to the back-end. Currently, it seems like I can only get specifically selected data from the charts, but I want to capture a click on the entire chart itself.

@domoritz
Copy link
Owner

You might be able to create a signal that triggers when the chart is clicked.

The easier solution would be to a way to register event listeners from Python. On the view, you could then set the listener with https://vega.github.io/vega/docs/api/view/#view_addEventListener.

Do you want to send a pull request to add this feature?

@Murtz5253
Copy link
Author

I would like to, yes, but I am still a bit confused at how the source code for this extension functions. In fact, when I try to run the example usage in the README, nothing gets printed out underneath the chart.

@domoritz
Copy link
Owner

@Murtz5253
Copy link
Author

That one works, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants