Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic assignment of Reversed and 'Normal' autorange not working properly #7263

Open
shaeck opened this issue Nov 7, 2024 · 0 comments
Open
Labels
bug something broken P3 backlog

Comments

@shaeck
Copy link

shaeck commented Nov 7, 2024

When we assign 'reversed' to autorange on the y-axis it reverses the graph properly. When we then want to switch back, so 'unreverse', which we do by assigning autorange: true, to the y-axis, it stays reversed. So: reversed graphs cannot switch back,

Some code snippets which indicate it:

const [layout, setLayout] = useState<Partial<Layout>>({

useEffect(() => {
    const isReversed = dataSettings.reference ? 'reversed' : true;
    setLayout((layout) => {
      return {
        ...layout,
        yaxis: {
          ...layout.yaxis,
          autorange: isReversed,
        },
      };
    });
  }, [dataSettings.reference]);
<Plot
              style={{ width, height }}
              data={plotData}
              layout={layout}
@gvwilson gvwilson added bug something broken P3 backlog labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants