Bar chart with empty space accumulation of bars

The title might be confusing, so hereโ€™s a reference, Iโ€™m trying to recreate a similar plotly graph:

I thought maybe violin could be used as a hack, but is there a better way to build this with bar traces?

Hi @guy, you could use the base attribute of go.Bar to set the base of a bar as the cumulative sum (np.cumsum) of the previous ones. See https://plot.ly/python/bar-charts/#customizing-individual-bar-base for an example using base.

1 Like

Thanks - this was helpful!