I want to change the ordering of legend in my boxplot from 1-12, or perhaps even renaming them to Jan, Feb, etc. Any idea how could I do it?
def make_box_plot(data, xdata, ydata, title, legend):
fig = px.box(data,
x= xdata,
y= ydata,
color= xdata)
fig.update_layout(
title= title,
xaxis_tickfont_size=14,
xaxis=dict(
title='Date',
),
yaxis=dict(
title='Sales',
titlefont_size=16,
tickfont_size=14,
),
legend=dict(
x=0.995,
y=0.98,
bgcolor='rgba(255, 255, 255, 0)',
bordercolor='rgba(255, 255, 255, 0)',
traceorder= 'grouped'
),
showlegend= legend
)
fig.show()

