Заголовок Legend
fig.update_layout(legend_title_text='Trend')
Chris P.
fig.update_layout(legend_title_text='Trend')
newnames = {'col1':'hello', 'col2': 'hi'}
fig.for_each_trace(lambda t: t.update(name = newnames[t.name],
legendgroup = newnames[t.name],
hovertemplate = t.hovertemplate.replace(t.name, newnames[t.name])
)
)