Using line chart, lines are connecting in weird order? How to fix? [closed]

enter image description here

Having a df of data, doing:

fig=px.line(df, x='date', y='px', color='description') 

The following graph is rendered like the image attached. Is this an expected behavior? How do I make dots connect only in a time-ordered fashion?


Yes, this is observed in plotly plots.

The data is required to be sorted before the plotting.