Closed
Description
Starting with Plotly.js 1.31.0, restyling a plot using timestamps instead of date strings turns the axis from a date axis to a numeric axis, even if the original data was in the same format, as can be seen in this codepen. In 1.30.0, this didn't happen.
var trace1 = {
x: [1509583143188, 1510187943188],
y: [1, 2]
};
var data = [ trace1];
var layout = {
title:'Line and Scatter Plot',
xaxis: { type: 'date'}
};
Plotly.newPlot('myDiv', data, layout);
// Restyling with the same data turns the axis from date to numeric type
Plotly.restyle('myDiv', {x: [[1509441408043, 1510046208043]], y: [[1, 2]]})