Skip to content

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

Closed
@emmanuelle

Description

@emmanuelle

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.

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions