I found the solution. I did some more research and stumbled upon this topic (Ploting time series data) where an working example was provided.
I basically progressively replaced my code to figure out which part was wrong. In the ‘layout’ part (within ‘figure’), I had specified:
xaxis={‘type’: ‘linear’}
Removing this line fixed my issue.
Hopefully this post will be helpful to others.