-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support for embedding plotlywidget instances that use numpy arrays #1117
Conversation
…tate. For some reason, this required renaming 'buffer' in the array representation object. Perhaps a conflict with naming conventions in ipywidgets. So the buffers are now stored in property named `value`
- Render initial empty figure on 'before-attach' event. This keeps the figure view from collapsing when opening a classic notebook that was saved with embedded widget state - Autoresize width even if height has been explicitly set - Autoresize in the classic notebook by responding to window resize events.
If the new plotlywidget can work with current version of plotly.py then we can put out a patch release of the widget only.
The buffer is named `buffer` when sent from plotly.py<=3.1.1, but it is named `value` when restoring from saved widget state and when receiving updates from plotly.py>=3.2.
finished rendering.
@tarzzz , if I publish this branch as |
@jonmmease I tested |
Merged in the CircleCI 2.0 integration |
@tarzzz Great! I'm going to merge this. My plan is to release this along with plotly.py version 3.2.0 and |
See #1116 for background.
With these updates it is now possible to embed
FigureWidget
instances containing numpy arrays in static contexts (e.g. nbviewer, and soon Plotly Cloud).I also took to opportunity to update the auto-resizing logic to:
This change involves no changes to the Python library, so we should be able to release this as
[email protected]
without making a release of plotly.py yet.Also, to help with embedding, this version emits an event named
'plotlywidget-after-render'
when the widget rendering process is complete.cc @tarzzz