I'm currently working on a graph to showcase the trend over time. The data I have is in Unix format and I use JavaScript code (new Date(data)).toUTCString
to display it in my title. Surprisingly, while the data for the graph and the title is the same, the graph seems to be running 1 hour ahead of the expected time. You can view an image here.
Below is the layout configuration I am using:
layout = {
"showlegend": true,
"title": new Date(min).toUTCString() + " to " + new Date(max).toUTCString(),
"xaxis": {
"autorange": true,
"range": [
min,
max
],
"title": "Time",
"type": "date" //if I change this to scatter, I get the Unix values
}
}
Plotly.newPlot('graphMain', temp, layout); //temp contains the arrays
Currently, I am based in Austria (UTC+01:00 timezone). Does anyone have any insights or suggestions on how to resolve this issue?