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 figures 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 of update at the start
- calling
addTraces manually instead of update
- calling
newPlot instead of update 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
Here is that code
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
In Dash, I'd like the Graph component to do smart
restyleandrelayoutupdates when I callnewPlotorplot(or some new method). Dash users deal withfigures 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:
newPlotinstead ofupdateat the startaddTracesmanually instead ofupdatenewPlotinstead ofupdatewhen switching between 2D, 3D, or ternarynewPlotwhen switching to a financial chart typeHere is that code
This would form the basis of a plotly.js React component.
Dash users will benefit from this immediately with:
Ideally, this logic would work its way into a robust
.animatemethod as well (.animate method that can handle any type of figure diff #1849)cc @rreusser @alexcjohnson @etpinard @cpsievert @monfera @jackparmer