Trying to implement new rounded bar corners

Hi guys,

I wanted to try the newly introduced rounded bar corners but cant implement it when plotting stacked bar graphs. Here is the code:

fig = go.Figure()

fig.add_traces(go.Bar(x=ver_1['LapNumber'],y=['Verstappen'],orientation='h',marker_color='#da291c',name='S',text=ver_1['LapNumber']))
fig.add_traces(go.Bar(x=ver_2['LapNumber'],y=['Verstappen'],orientation='h',marker_color='#ffd12e',name='M',text=ver_2['LapNumber']))
fig.add_traces(go.Bar(x=ver_3['LapNumber'],y=['Verstappen'],orientation='h',marker_color='#da291c',showlegend=False,text=ver_3['LapNumber']))

fig.update_layout(title='Tyre Strategies: 2024 Spanish Grand Prix',barmode='stack',height=500,template='plotly_dark')
fig.show()

Any ideas on how to implement it on the stacked bar graphs?

Thanks in advance

As shown in the reference, the corners of the bar graph need to be set.

fig.update_layout(title='Tyre Strategies: 2024 Spanish Grand Prix',
                  barmode='stack',
                  height=500,
                  template='plotly_dark',
                  barcornerradius=15
                 )

When I try this only the last trace of stacked bar graph is rounded as seen in this picture.

I want every trace of the stacked bar graph to be rounded.

1 Like

As a feature at this time, it does not support all tracing, and only the tip seems to be rounded.

Thought so. Anyways, thank you very much for taking the time out to help me. This community rocks