Closed
Description
In Dash, I'd like the Graph component to do smart restyle
and relayout
updates when I call newPlot
or plot
(or some new method). Dash users deal with figure
s and not diffs.
Programming this logic myself is a lot of work that other groups could benefit from if it was done centrally in plotly.js. I wrote a lot of the logic in the workspace and it took a while to work through all the kinks. Some of the edge cases included:
- calling
newPlot
instead ofupdate
at the start - calling
addTraces
manually instead ofupdate
- calling
newPlot
instead ofupdate
when switching between 2D, 3D, or ternary - calling
newPlot
when switching to a financial chart type - deleting cartesian axes when swithing to ternary or mapbox
This would form the basis of a plotly.js React component.
Dash users will benefit from this immediately with:
- Faster updates enabling their apps to refresh every 50ms and mimic live-streaming
- Mapbox updates with full map redraws
Ideally, this logic would work its way into a robust .animate
method as well (.animate method that can handle any type of figure diff #1849)
cc @rreusser @alexcjohnson @etpinard @cpsievert @monfera @jackparmer