Freeze Plotly-dash Graph Visualization
I am working on a dash app, here is my code: import numpy as np import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Inp
Solution 1:
I believe what you are looking for is the uirevision
property (for details, see the documentation). To keep zoom, pan etc., set this property when you update the figure, i.e.
fig['layout']['uirevision'] = 'something'
It doesn't matter what you set as the value (you can use a number, a string, etc.), it only matters that the value remains unchanged during subsequent updates (where you wan't to keep zoom, pan, etc.). Whenever you need to reset the view, change the value to something else, e.g.
fig['layout']['uirevision'] = 42
Post a Comment for "Freeze Plotly-dash Graph Visualization"