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

working vega component that support altair charts and vega dict #1

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

LeoGrosjean
Copy link

This is still work in progress

You can check @Alek99 my issues with how events should work

I will remove all comments and TODOs

I have an issue with serializer, I will open a ticket / PR to allow serializer overwrite

Copy link
Member

@Alek99 Alek99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the PR! Can you separate the Vega and Altair into different folders and make them separate PRs. We will publish them separately as different packages

@LeoGrosjean
Copy link
Author

Hey @Alek99 !

I'm still working struggling on :

  • signal_listeners
  • on_new_view

Props on_new_view

onNewView={(view) => {
   view.addEventListener("click", (_e, item) => console.log(item)); # state event instaid !
   view.addEventListener("hover", (_e, item) => console.log(item)); # state event instaid !
 }}

As asked, I renamed custom component as altair only to keep only python and avoid custom js !

@LeoGrosjean
Copy link
Author

I added support for onNewView

It get construct from those props :

on_new_view_click
on_new_view_dblclick
...
on_new_view_dragleave

Sadely page reload and all selection are removed when event is trigger (big charts can also flash)

@LeoGrosjean
Copy link
Author

All flashing and page reload has been fixed !
Altair is ready to be used at his max potential in reflex !

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

Successfully merging this pull request may close these issues.

2 participants