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

Lightning renderer is broken inside ipywidgets.Output #36

Open
aggFTW opened this issue Nov 2, 2015 · 5 comments
Open

Lightning renderer is broken inside ipywidgets.Output #36

aggFTW opened this issue Nov 2, 2015 · 5 comments

Comments

@aggFTW
Copy link

aggFTW commented Nov 2, 2015

Hello, @ellisonbg and I are working on creating an Altair ipython widget to interact with the vegalite spec that gets passed to the lightning renderer. However, @ellisonbg found that the lightning renderer is broken inside ipywidgets.Output

Probably the easiest way to get a repro would be to install latest Altair and comment out the create_render_view method here: https://github.com/ellisonbg/altair/blob/master/altair/view.py

Then, from this notebook: https://github.com/ellisonbg/altair/blob/master/notebooks/WidgetView.ipynb
add this cell: view.create_render_view(v1, shelves=('x','y','color','size'))

@ellisonbg might have better repro steps?

Issue is here: https://github.com/ellisonbg/altair/issues/82

@freeman-lab suggested opening an issue here for him and @mathisonian to take a look. Thanks!

@ellisonbg
Copy link

This may take some digging around, but I think that using a unique
id= on the top level element may help some of these issues.

On Mon, Nov 2, 2015 at 5:48 PM, Alejandro Guerrero Gonzalez <
[email protected]> wrote:

Hello, @ellisonbg https://github.com/ellisonbg and I are working on
creating an Altair ipython widget to interact with the vegalite spec that
gets passed to the lightning renderer. However, @ellisonbg
https://github.com/ellisonbg found that the lightning renderer is
broken inside ipywidgets.Output

Probably the easiest way to get a repro would be to install latest Altair
and comment out the create_render_view method here:
https://github.com/ellisonbg/altair/blob/master/altair/view.py

Then, from this notebook:
https://github.com/ellisonbg/altair/blob/master/notebooks/WidgetView.ipynb
add this cell: view.create_render_view(v1,
shelves=('x','y','color','size'))

@ellisonbg https://github.com/ellisonbg might have better repro steps?

Issue is here: ellisonbg/altair#82
https://github.com/ellisonbg/altair/issues/82

@freeman-lab https://github.com/freeman-lab suggested opening an issue
here for him and @mathisonian https://github.com/mathisonian to take a
look. Thanks!


Reply to this email directly or view it on GitHub
#36.

Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]

@aggFTW
Copy link
Author

aggFTW commented Nov 5, 2015

Friendly ping :) Have you had a chance to take a look at this?
Thanks!

@aggFTW
Copy link
Author

aggFTW commented Nov 9, 2015

Hi,

We want to release a product that relies on the lightning renderer and this could block our shipping of it. We are anxiously waiting for some reply :) I am willing to work on it as long as I can get some guidance.

cc. @ellisonbg @sangeethashekar

Thanks!
Alejandro

@mathisonian
Copy link
Member

hey @aggFTW, sorry for the delay, I've been pulled away on other projects. It will be a couple days before I can really dig into it, but here is what I would recommend:

When using lightning in the "headless" mode the template that renders the visualization is kept here: https://github.com/lightning-viz/lightning-python/blob/master/lightning/lib/template.html.

I would recommend testing the change using lightning in local mode first and if this works we can apply the same change to the server. You can pass additional parameters to the template by adding to the fields dictionary here: https://github.com/lightning-viz/lightning-python/blob/master/lightning/visualization.py#L151-L160

@mathisonian
Copy link
Member

Hey @aggFTW, coming back to this - could you help me reproduce?

I'm following these steps:

  1. comment out this function in altair https://github.com/ellisonbg/altair/blob/master/altair/view.py#L102-L115
  2. use this notebook and add cell use_renderer('lightning')
  3. add cell view.create_render_view(v1, shelves=('x','y','color','size'))
  4. render view is displayed
  5. click "render", nothing happens - no js errors or updates on the screen

I'm not sure what else I need to do to see the errors

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

3 participants