I have a dcc.Graph that displays images that can be modified/updated by colour, filtering, etc. The initial graph is created
fig = px.imshow(Image.fromarray(image))
and the uirevision setting is applied as:
fig = go.Figure(fig)
fig['layout']['uirevision'] = True
The zoom coordinates are kept when zoomed in, but the actual graph image zooms back out any time the graph is updated.
Hmm, I do something similar in one of my apps where this works, would you mind sharing your code or a minimal app which reproduces the issue?
Hello, I think that I have resolved this. The issue was that every time I was updating the canvas, I was effectively creating a new figure with a new layout. Updating the existing figure with new data, instead of updating the layout with uirevision for a new set of data, seems to have resolved the problem.