Open
Description
Note: to reproduce, see here
The problem
Baseline
long_df = px.data.medals_long()
fig = px.bar(long_df, x="nation", y="count", color="medal", title="Long-Form")
fig.update_layout(width=680, height=480,)
fig.show()
Increasing the gap works
long_df = px.data.medals_long()
fig = px.bar(long_df, x="nation", y="count", color="medal", title="Long-Form")
fig.update_layout(autosize=False, width=680, height=480, legend_tracegroupgap=50)
fig.show()
Increasing the gap & reversing doesn't work
long_df = px.data.medals_long()
fig = px.bar(long_df, x="nation", y="count", color="medal", title="Long-Form Input")
fig.update_layout(width=680,height=480, legend_traceorder="reversed", legend_tracegroupgap=50)
fig.show()