plotly.py
plotly.py copied to clipboard
Switch to use anywidget
Co-authored by @manzt! This updates the logic for the FigureWidget to rely on anywidget.
A quote about anywidget from the documentation for context:
anywidget is both a specification and toolset for authoring reusable web-based widgets for interactive computing environments. As a specification, it defines a standard for widget front-end code. As a toolkit, it provides tools for authoring widget front-end code according to the specification, as well as a Python library that simplifies creating and publishing custom Jupyter Widgets.
This will not affect the go.Figure class. High level explanation of the difference between using go.Figure and go.FigureWidget:
-
go.Figure: The chart generated by this object will be interactive on the client side. For many purposes, this is all a user needs to do with a chart. The interactions are things like zooming in, or any of the various operations in the toolbar. -
go.FigureWidget: The difference here is that the figure is interactive on the server side as well.- Interactions with the plotly chart can be sent to the python kernel and used in other widgets.
- Interactions with other widgets can be used to control the chart