Skip to content

react() and plot_bgcolor #4807

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

Closed
nicolaskruchten opened this issue May 4, 2020 · 8 comments · Fixed by #4816
Closed

react() and plot_bgcolor #4807

nicolaskruchten opened this issue May 4, 2020 · 8 comments · Fixed by #4816
Assignees
Labels
bug something broken
Milestone

Comments

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented May 4, 2020

This is a CodePen https://codepen.io/nicolaskruchten/pen/pojdmaX?editors=0010 that illustrates the issue outlined in https://community.plotly.com/t/changing-the-background-colour-of-a-graph/29246/8 and logged in Dash as plotly/dash#1107

Edit: the newPlot behaviour is correct and the react behaviour is not.

@nicolaskruchten nicolaskruchten added the bug something broken label May 4, 2020
@nicolaskruchten nicolaskruchten added this to the 1.54.2 milestone May 4, 2020
@nicolaskruchten
Copy link
Contributor Author

@alexcjohnson is it intended that in the second figure straight off of newPlot that plot_bgcolor: "red" does nothing?

@alexcjohnson
Copy link
Collaborator

plot_bgcolor only applies to cartesian subplots AFAIK. All the other subplot types have their own subplot container objects (in this case scene) with their own bgcolor attributes. Might have been a good idea for these to inherit from plot_bgcolor but I think that ship has sailed.

If you add scene: {bgcolor: "green", domain: {x: [0,0.7]}} to the second layout you'll see both green and blue after react-ing from 0 to 1

@nicolaskruchten
Copy link
Contributor Author

OK re cartesian subplots... Does this make the current behaviour "correct" or do we agree that the blue should be cleared when I react from scatter to scatter3d ?

@alexcjohnson
Copy link
Collaborator

Oh definitely a bug

@nicolaskruchten
Copy link
Contributor Author

So what do you think the correct behaviour should be? on newPlot2 should there be a red background, or should the background go to white on react2?

@alexcjohnson
Copy link
Collaborator

There’s no Cartesian subplot so there should be no red, just white.

@nicolaskruchten
Copy link
Contributor Author

OK, so the newPlot behaviour is correct and the react behaviour is not.

@nicolaskruchten nicolaskruchten modified the milestones: 1.54.2, 1.54.3 May 4, 2020
@archmoj archmoj modified the milestones: v1.54.3, v1.54.2 May 6, 2020
@archmoj archmoj self-assigned this Jun 5, 2020
@plbremer
Copy link

plbremer commented Jun 2, 2023

hi

from what I can tell, it is not possible to update sunburst background color?

Thanks

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

Successfully merging a pull request may close this issue.

4 participants