Horizontal legend of figure is not aligned in dash/plotly

When i generate the gantt chart using plotly, i faced with a issue related legend. so, if i change the orientation of legend to horizontal:

fig['layout'].update(legend=dict( orientation = 'h')

it works but the labels are not aligned. as u see in a screenshot

Also i have other issue, when i choose more lines from dropdown menu in dash, the legend overlaps with the graph, and in this case it is not possible to see the grap, as you see in th epicture below:

1 Like

I’ve got the same issue, did you manage to find a solution?

setting legend_title_text to an empty string fixed it for me

1 Like