Skip to content

Plot is getting stuck in the same zoom level regardless of changes #139

@mbkupfer

Description

@mbkupfer

I can't for the life of me figure out why my plot's revision is not changing. At first, my intention was to reset the zoom when all selections from a dropdown were removed, but now it doesn't even reset at any point. I deployed an initial proof of concept a week back and had no issue, but now it seems to get stuck at a zoom level regardless of what I do with revision, uirevision, immutability-helpers, etc. I'm very new to the react world (not to plotly though), so this might be something I'm doing wrong -- likely not a bug, but I would be eternally grateful on any guidance on how to fix this.

I have created a minimal reproducible example in codesandbox that is as close to the current state of my actual viz component here: https://codesandbox.io/embed/yqn7j0v90v

As demonstrated in the gif below, the axis zoom never changes when I choose new selections. While it isn't intended to change for each selection, I do want it to reset when the dropdown is cleared, but I can't get it to reset in any case:

react-ploty-question-1

The gif below is taken from my initial foray into react-plotly and as you can see, the zoom resets on any selection change, but I can't figure out why this isn't the case in the sandbox code I shared:
react-ploty-question-2

Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions