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

Axes not redrawing after layout change #45

Closed
igorpejic opened this issue Feb 21, 2018 · 5 comments
Closed

Axes not redrawing after layout change #45

igorpejic opened this issue Feb 21, 2018 · 5 comments
Assignees

Comments

@igorpejic
Copy link

After migrating to plotly.js@1.34.0 and react-plotly@1.4.0 axes are not being redrawn after changing the number of axes in layout.

Before:

screenshot

After:

screenshot

https://codepen.io/igorpejic/pen/yvjxMY?editors=1010

I have tried adding the datarevision argument, but it didn't help.

(Let me know if this is a proper fit for react-plotly.js or I should post it to plotly.js)

@nicolaskruchten
Copy link
Contributor

This is the right place, and thanks for the easy to see demo! I'll try to get a fix or answer for you this week.

@nicolaskruchten nicolaskruchten self-assigned this Feb 21, 2018
@nicolaskruchten
Copy link
Contributor

@alexcjohnson is this one of those cases where Plotly.react needs a bit of extra help to clean up axes?

@alexcjohnson
Copy link
Collaborator

Looks like a plotly.js bug, it's not specific to Plotly.react, I can get this to happen with Plotly.deleteTraces too:

Plotly.newPlot(gd,
    [{y: [1,2,3]}, {y: [10, 30, 20], yaxis: 'y2'}],
    {yaxis2: {side: 'right', overlaying: 'y'}}
);
Plotly.deleteTraces(gd, [1]);

I'll make a new issue for it over there.

@igorpejic
Copy link
Author

igorpejic commented Feb 26, 2018

I have temporarily solved the issue by manually checking if datarevision has changed in react-plotly.js in my own fork.
igorpejic@76756e4

After some investigation in plotly.js I assume the bug was introduced by: plotly/plotly.js#2341 and plotly/plotly.js#2227

Specifically commits like this which are connected with different restyle logic based on traces and not axis: plotly/plotly.js@aab4f11

@nicolaskruchten
Copy link
Contributor

This is fixed with the latest version of plotly.js https://github.com/plotly/plotly.js/releases/tag/v1.35.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants