How to use color_discrete_sequence in sunburst subplot instead of using default color?

@rtb

To get help you must give more information on your code. I give an example of sunburst subplots where each one has been defined initially via px.sunburst:

fig = make_subplots(rows=1, cols=2, 
                    specs=[ [{"type": "sunburst"}, {"type": "sunburst"}])

df = px.data.tips()
figaux = px.sunburst(df, path=['sex', 'day', 'time'], values='total_bill', color='time', 
                      color_discrete_sequence=px.colors.qualitative.Pastel)
fig.add_trace(figaux.data[0], row=1, col=1)
figaux = px.sunburst(df, path=['sex', 'day', 'time'], values='total_bill', color='time',
                  color_discrete_map={'(?)':'black', 'Lunch':'gold', 'Dinner':'darkblue'})
fig.add_trace(figaux.data[0], row=1, col=2)
fig.update_layout(width=700, height=400)

1 Like