I have dynamic dropdown list, which sets the color of labels for the graph.But when selection has one element in it throws an error, otherwise it works fine.
app_graph2`=px.scatter(df, x="MAX_TEMP", y="DEMAND", color="STATE", title='Scatter Plot Demand Vs Maximum Temperature')
I have dcc.dropdown for STATE with multi=True, it throws error, when user selects one state.
plotly\express\_chart_types.py", line 252, in line
return make_figure(args=locals(), constructor=g
o.Scatter)
plotly\express\_core.py", line 1852, in make_figure
for val in sorted_group_values[m.grouper]:
Is there any alternative to resolve it ?
Thanks!