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

Please support events. #66

Open
MarcSkovMadsen opened this issue Jan 30, 2022 · 5 comments
Open

Please support events. #66

MarcSkovMadsen opened this issue Jan 30, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@MarcSkovMadsen
Copy link

Panel 0.13 (to be released in weeks) will provide support for events on the Vega pane.

I would like to be able to provide the same on the Panel VegaFusion pane.

I don't know if this is currently possible with VegaFusion or how?

Inspiration

You can find the typescript implementation of the Vega pane here https://github.com/holoviz/panel/blob/master/panel/models/vega.ts

You can find the development version of the Vega pane docs here describing the event api here https://pyviz-dev.github.io/panel/reference/panes/Vega.html

@jonmmease jonmmease added the enhancement New feature or request label Jan 30, 2022
@jonmmease
Copy link
Collaborator

By events are you talking about the selection parameter? This is definitely something on the roadmap.

I'd like to explore the design space a little bit here. In particular, with Jupyter Widgets it's possible to define widgets that are not displayed. And so one idea I've thought about is to define widget variants of the alt.Selection objects. These would get live updated and could be write-able as a way to sync selections across Charts.

@MarcSkovMadsen
Copy link
Author

MarcSkovMadsen commented Jan 31, 2022

I don't know what is possible. But i am thinking about all the normal events like click, mouse Enter, mouse leave, mouse over, selections etc.

I would like the VegaFusion pane to cover minimum the same features and use cases as the Panel Bega pane.

@jonmmease
Copy link
Collaborator

I would like the VegaFusion pane to cover minimum the same features and use cases as the Panel Vega pane.

I'm not seeing documentation of where the Panel Vega pane supports "click, mouse Enter, mouse leave, mouse over" events. Am I missing that somewhere in https://pyviz-dev.github.io/panel/reference/panes/Vega.html?

@MarcSkovMadsen
Copy link
Author

MarcSkovMadsen commented Jan 31, 2022

It is actually in the documentation. https://pyviz-dev.github.io/panel/reference/panes/Vega.html#selections. But it is not very clear unless you run the documentation as a notebook. It also looks like Altair/ Vega has more specific events than click etc. Here is an example of subscribing to the brush event.

image

Another place to look is probably this PR holoviz/panel#2592.

@MarcSkovMadsen
Copy link
Author

See also this discussion. vega/altair#1153

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

No branches or pull requests

2 participants