Skip to content

sunburst bug when color and values correspond to the same column #2567

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
emmanuelle opened this issue Jun 15, 2020 · 0 comments · Fixed by #2591
Closed

sunburst bug when color and values correspond to the same column #2567

emmanuelle opened this issue Jun 15, 2020 · 0 comments · Fixed by #2591
Assignees
Labels
bug something broken
Milestone

Comments

@emmanuelle
Copy link
Contributor

Reported in the community forum https://community.plotly.com/t/plotly-sunburst-node-colors/41037

import plotly.express as px
import numpy as np
df = px.data.gapminder().query("year == 2007")
fig = px.sunburst(df, path=['continent', 'country'], values='lifeExp',
                  color='lifeExp',
                  color_continuous_scale='RdBu')
fig.show()

image
The color of a sector should be the average of its children but it seems to be the sum for this case.

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
2 participants