Bar chart of categorical data in Dash

I am a beginner with Dash but so far I think it is pretty cool. I have a tool with already 4 graphs showing numerical data, but now I want to add two other ones with categorical data to show the state changes of a thing, something looking like that:

So far, the only thing I was able to get is this :

How can i get the result I want with a plotly graph ?

You can probably achieve this with stacked bar charts:

You may need to do a few calculations yourself, but I assume it’s possible.