New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据包含时间戳,精确到毫秒,为何少了8小时? #5393

Closed
wangbingxu opened this Issue Mar 30, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@wangbingxu

时间戳少了8小时,时区问题? 之前都正常的,今天突然发现出错了,核实了下跟后台没关系

option = {
title: {
text: "4343",
textStyle: {
fontSize: 23
},
x: "center",
top: 10,
},
tooltip: {
trigger: 'axis',
formatter: function (params) {
var date = new Date(params[0].data.value[0]);
var returnHtml = "test
"
+ echarts.format.formatTime("YYYY-MM-dd HH:mm:ss", date)+"
"
+ params[0].data.value[1];
return returnHtml;
},
axisPointer: {
animation: true
}
},
xAxis: {
type: 'time',
splitLine: {
show: false
},
},
yAxis: {
type: 'value',
boundaryGap: [0, '100%'],
splitLine: {
show: false
}
},
series: [{
name: '',
type: 'line',
data: [
{
name:65,
value:{
0:1490749200000,
1:"67.7"
}
},{
name:65,
value:{
0:1490745600000,
1:"86.8"
}
},{
name:65,
value:{
0:1490742000000,
1:"98"
}
},{
name:65,
value:{
0:1490738400000,
1:"97.1"
}
},{
name:65,
value:{
0:1490734800000,
1:"90.2"
}
}
],
lineStyle: {
normal: {
width: 3
}
}
}]
};

我已将代码放在你们ECharts Gallery上:
http://gallery.echartsjs.com/editor.html?c=xS1HkJoO2e&comment=0
可直接点击浏览。

100pah added a commit that referenced this issue Apr 4, 2017

@wangbingxu

This comment has been minimized.

Show comment
Hide comment
@wangbingxu

wangbingxu Apr 5, 2017

有木有人??难道ECharts团队老大带着小姨子走了么???

有木有人??难道ECharts团队老大带着小姨子走了么???

@pissang pissang closed this Apr 5, 2017

@chyfreefly

This comment has been minimized.

Show comment
Hide comment
@chyfreefly

chyfreefly Jul 13, 2017

检查一下是不是UTC时区的问题,转换成你想要的时区。

检查一下是不是UTC时区的问题,转换成你想要的时区。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment