Plotly.js - stacked bars in subplots

I guess barmode should be specified for the subplots layout.

p = [p1, p2]
p.plot.layout["barmode"] = "stack"
p