Iβm trying to make a 100% stacked barchart.
Is this possible in plotly or should I adapt the dataframe?
import pandas as pd
import plotly.express as px
df = pd.DataFrame({"DateTime": pd.date_range(start="2022-01-01", end="2022-01-10")})
df["A"] = np.random.randint(0, 10, size=len(df))
df["B"] = np.random.randint(0, 5, size=len(df))
fig = px.bar(df, x='DateTime', y=['A','B'],title="Stacked barchart 100%",barmode='relative')
fig.update_layout(legend_title="Legende")
fig.show()