【发布时间】:2016-03-18 14:59:58
【问题描述】:
我正在制作一个图表来显示一段时间内的状态。所有数据均采用 unix 格式。我使用 javascript (new Date(data)).toUTCString 在我的标题中显示数据。这是用于图表的相同数据,但图表提前 1 小时运行。 Image
这是我的布局配置:
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
我目前居住在奥地利 (UTC+01:00)。 有人对此有想法吗?
【问题讨论】:
标签: javascript date timezone plotly