I am trying to create a Plotly Dash stacked graph. When I have more than four different bars in my stack, the graph becomes impossible to see. Here is my code…
dcc.Graph(
figure=go.Figure(
data=[
go.Bar(
x=list(df.month.unique()),
y=df.loc[df['location'] == 'Brn'].Talks,
name='Brn',
marker=go.bar.Marker(
color='#da202a',
)
),
go.Bar(
x=list(df.month.unique()),
y=df.loc[df['location'] == 'Wrl'].Talks,
name='Wrl',
marker=go.bar.Marker(
color='#2a2a2d',
)
),
go.Bar(
x=list(df.month.unique()),
y=df.loc[df['location'] == 'Lpl'].Talks,
name='Lpl',
marker=go.bar.Marker(
color='#c1c6c8',
)
),
go.Bar(
x=list(df.month.unique()),
y=df.loc[df['location'] == 'HNE'].Talks,
name='HNE',
marker=go.bar.Marker(
color='#0892cb',
)
),
layout=go.Layout(
title='Conversation Required',
showlegend=True,
barmode='stack',
xaxis = dict(tickvals=df.month.unique())
))
This is my code for creating the different stacks, however, when I want to add 5 or more stacks on the bar chart everything becomes impossible to see? Any help on how to fix this?