You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to export a pydeck visualization to a static image.
As per #4828 there is no current way of doing this using builtin-functionality.
However some of the comments point towards #4436 for exporting static images.
My current approach is modifying the generated HTML and injecting a button along with export functionality. (
I used this example from the pydeck documentation, changes to the html can be seen here)
Unfortunately I was not successfull in getting the button to export the image using html2canvas as the preserveDrawingBuffer option is set to false (as can be observed by the corresponding warning in the web console).
Using a minimal deck.gl scripting example I was able to export the image when the option is set to true confirming that my custom export form pydeck is most likely failing because of the DrawingBuffer not being preserved.
I have tried turning this option on by passing the option via the glOptions / deviceProps (according to #8896 deviceProps is the new handle) objects and also tried adding the object to the createDeck function call in the pydeck-generated html but was unable to get it working.
Is there any option I'm missing to pass WebGL context attributes to pydeck (either via python or by modifying the generated html file) ?
Edit:
The warning I was referencing appears in the console when the button is clicked and looks like this:
The entire console log after pressing the button looks like this:
Console logs from Firefox Version 128.5.2esr (64-Bit). Also tested in Chrome with similar results (blank image, warning message)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I want to export a pydeck visualization to a static image.
As per #4828 there is no current way of doing this using builtin-functionality.
However some of the comments point towards #4436 for exporting static images.
My current approach is modifying the generated HTML and injecting a button along with export functionality. (
I used this example from the pydeck documentation, changes to the html can be seen here)
Unfortunately I was not successfull in getting the button to export the image using html2canvas as the preserveDrawingBuffer option is set to false (as can be observed by the corresponding warning in the web console).
Using a minimal deck.gl scripting example I was able to export the image when the option is set to true confirming that my custom export form pydeck is most likely failing because of the DrawingBuffer not being preserved.
I have tried turning this option on by passing the option via the glOptions / deviceProps (according to #8896 deviceProps is the new handle) objects and also tried adding the object to the createDeck function call in the pydeck-generated html but was unable to get it working.
Is there any option I'm missing to pass WebGL context attributes to pydeck (either via python or by modifying the generated html file) ?
Edit:
The warning I was referencing appears in the console when the button is clicked and looks like this:
The entire console log after pressing the button looks like this:
Console logs from Firefox Version 128.5.2esr (64-Bit). Also tested in Chrome with similar results (blank image, warning message)
Beta Was this translation helpful? Give feedback.
All reactions