The plot works fine on codepen
But the exact same code produces the following output on my system.
As you can see plotly seems to think the numbers on x axis are dates. Not sure why this is happening.
My plotly version is 1.31.0
console.log(typeof(xdata)) produces number in the console.