I think because you are just add _trace
with data[0]
so it just returned one.
So I think you should do something as below:
fig = make_subplots(rows=1, cols=2, column_widths=[0.90,0.10], shared_yaxes=True, subplot_titles=("Monthly waste","YTD"))
fig1 = px.bar(df_monthly, y="%", x="Month", color="Process", text="%")
fig2 = px.bar(df_yearly, x="Year", y = "%y", text = "%y", color="Process")
fig.add_trace(fig1['data'][0], row=1, col=1)
fig.add_trace(fig1['data'][1], row=1, col=1)
fig.add_trace(fig1['data'][2], row=1, col=1)
fig.add_trace(fig2['data'][0], row=1, col=2)
fig.add_trace(fig2['data'][1], row=1, col=2)
fig.add_trace(fig2['data'][2], row=1, col=2)
fig.update_layout(
xaxis = dict(
tickmode = 'linear',
tick0 = 1
)
)
fig.update_layout(barmode='stack')
fig.update_traces(
textposition="outside",
texttemplate='%{text:.4}'
)
fig.show()