I aim to plot a bar chart, depicting the monthly warehouse evolution. In this warehouse, there are several items, which can be aggregated in “categories”.
I used the property “offsetgroup” to plot what I need. However, by default, the bars representing the categories are displayed as “group”, while the bars representing the quantity of each asset in each group are “overlay”.
I enclose a picture to illustrate what I currently have, and what I would need:
Documentation describes this behaviour:
Shifts the position where the bar is drawn (in position
axis units). In “group” barmode, traces that set
“offset” will be excluded and drawn in “overlay” mode
Set several traces linked to the same position axis or
matching axes to the same offsetgroup where bars of the
same position coordinate will line up.
Problem is, if i set “barmode=stacked”, then each bar is stacked in the same bar. I need to have the bars inside each category only, stacked, instead of overlayed. How can I change the default logic ?