Register Click for Entire Chart Object
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.
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?
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.
Does https://share.streamlit.io/domoritz/streamlit-vega-lite-demo/main/demo.py work?
That one works, yes.