Can be a marginal part of Scatter stacked?

    fig = px.scatter(events, x='timestamp', y='event_type', color='event_type',
                     marginal_x="histogram")

I would like to see x dimension on a marginal section as Stacked Bars, currently the bars are overlapped. Is that possible to set up?

I found a solution but am not sure if it’s correct.

Simply called the method update_layout() and it works. I expected the method sets up only the main section of a chart.

fig = px.scatter(events, x='timestamp', y='event_type', color='event_type',
                     marginal_x="histogram")
fig.update_layout(barmode='stack')