PlotlyJS: stacked barmode not working as expected

I think that your first picture is the example above the example you expected; the one for bar2() in Bar · PlotlyJS

2 Likes