我有两个highChart,我不知道为什么时间以不同的方式呈现。在第一个1483336800000-1483338600000这是07:00-07:30正在呈现为06:00-06:30这是正常的,因为UTC时间 但在第二个HighChart 1491885000000-1491890400000中,06:30-08:00正在延迟两小时,也就是04:30-06:00。在第二种情况下,应该像第一种情况一样延迟一小时 也是从05:30-07:00。两个highCharts有什么不同?
这是第一种情况:
https://jsfiddle.net/0zw7gq82/6/
Highcharts.chart('container',
{
chart: {
type: 'columnrange',
inverted: true,
height: 192,
spacingLeft: 30
},
credits: {
enabled: false
},
title: {
text: null,
style: {
"fontSize": "6px"
}
},
subTitle: {
text: null
},
legend: {
enabled: false,
},
plotOptions: {
series: {
pointWidth: 30,
borderWidth: 0,
borderColor: '#3366cc'
}
},
xAxis: {
min: 1,
max: 1,
categories: ['', ''],
title: {
text: null
},
labels: {
rotation: 90
},
gridLineWidth: 0
},
yAxis: {
type: 'datetime',
title: {
text: null
},
labels: {
rotation: -45,
style: {
"fontSize": "6px",
"color": "#000000"
}
},
tickInterval: 1800000,
gridLineWidth: 1
},
series: [{
data: [ {
x: 1,
low: 1483336800000,
high: 1483338600000,
color: '#3366cc'
} ]
}]
}
);
第二种情况:
https://jsfiddle.net/0zw7gq82/7/
Highcharts.chart('container',
{
chart: {
type: 'columnrange',
inverted: true,
height: 192,
spacingLeft: 30
},
credits: {
enabled: false
},
title: {
text: null,
style: {
"fontSize": "6px"
}
},
subTitle: {
text: null
},
legend: {
enabled: false,
},
plotOptions: {
series: {
pointWidth: 30,
borderWidth: 0,
borderColor: '#3366cc'
}
},
xAxis: {
min: 1,
max: 1,
categories: ['', ''],
title: {
text: null
},
labels: {
rotation: 90
},
gridLineWidth: 0
},
yAxis: {
type: 'datetime',
title: {
text: null
},
labels: {
rotation: -45,
style: {
"fontSize": "6px",
"color": "#000000"
}
},
tickInterval: 1800000,
gridLineWidth: 1
},
series: [{
data: [{
x: 1,
low: 1491885000000,
high: 1491890400000,
color: '#3366cc'
}
]
}]
}
);
我只想提一下,在我的情况下我不能使用这个选项
Highcharts.setOptions({
global: {
useUTC: false
}
});