You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our application uses dcc.Graph to render images. Currently, the zoom feature maintains the aspect ratio of the full-resolution image. Is it possible to configure the graph component to permit drag zooming of arbitrary aspect ratios? One consideration is that the behaviour would be separate from scollZoom as scrolling would have to maintain the current aspect ratio
The text was updated successfully, but these errors were encountered:
Arbitrary aspect zoom normally is possible, unless your graph locks its aspect ratio, for example with yaxis.scaleanchor = “x”. Where this gets confusing is with image traces, that make this the default behavior. In that case you have to explicitly unlock it, for example: fig.update_layout(yaxis_scaleanchor=None)
matt-sd-watson
changed the title
Allow drag zoom of arbitrary aspect ratio with dcc.Graph
Allow drag zoom of arbitrary aspect ratio with dcc.Graph and image as data
Nov 12, 2024
Ah so it's False, not None... and it seems like in different situations the scaleanchor can get set on either x or y, so the most reliable way to do this I think is:
Our application uses
dcc.Graph
to render images. Currently, the zoom feature maintains the aspect ratio of the full-resolution image. Is it possible to configure the graph component to permit drag zooming of arbitrary aspect ratios? One consideration is that the behaviour would be separate fromscollZoom
as scrolling would have to maintain the current aspect ratioThe text was updated successfully, but these errors were encountered: