So, I’ve been encountering this bug for few days now and I’m not sure what is causing it. So basically I have 3 pie subplots with a custom colour applied to it. The colours are these,
but instead the pie graphs looks like these…
looking through the DevTool the first colour (The largest part of the pie) is always the default blue which is rgb(99, 110, 250) aka “#636efa”. Supposedly It should be the Red #FF1818 but it doesn’t seem to work.
anyways here’s the code bit relating to it.
# subplot for pizza pie
fig.add_trace(
go.Pie(
labels=mat,
values=pizza,
name="Pizza pie DB",
hole=0.5,
scalegroup="dashboard_pie",
),
1,
1,
)
# subplot for Shepherd's Pie
fig.add_trace(
go.Pie(
labels=mat,
values=shepherd,
name="Shepherd's pie DB",
hole=0.5,
scalegroup="dashboard_pie",
),
1,
2,
)
# subplot for Potato pie
fig.add_trace(
go.Pie(
labels=mat,
values=potato,
name="Potato pie DB",
hole=0.5,
scalegroup="dashboard_pie",
),
1,
3,
)
fig.update_layout(
title_text="Best Pies in the World",
annotations=[
dict(text="Pizza pie", x=0.12, y=0.50, font_size=16, showarrow=False),
dict(text="Shepherd's Pie", x=0.50, y=0.50, font_size=16, showarrow=False),
dict(text="Potato Pie", x=0.87, y=0.50, font_size=16, showarrow=False),
],
),
fig.update_traces(
hoverinfo="label+value",
textinfo="percent",
marker=dict(
colors=[
"#5463FF",
"#FFC300",
"#FF1818",
"#70C1B3",
"#79b159",
"#42D9C8",
]
),
)
#somewhere down the line...
dcc.Graph(
figure=fig,
style={"height": "75vh"},
className="mt-3",
config=config,
),