I have a graph that looks like this:
As per plotly's documentation:
If a color argument is passed, the color of a node is computed as the average of the color values of its children, weighted by their values.
I would like tha color map max value to be the money_generated_sum, which is not a column in my df but something that plotly generates itself. The column I use is money_generated.
The df follows this structure:
category new money_generated
dog False 500
cat True 800
cat False 70
dog False 5000
dog True 300
import plotly.express as px
fig = px.sunburst(df, path=['category','new'],
values='money_generated',
color = 'money_generated')
fig.show()
Is it possible to change how the color map values in plotly sunburst chart?
