这是我的问题的图片。绘制图表后,xAxxis 正好是 1 晚(如果是 12:20 -> 在图表中是 11:20)......但是当我放大图表并重置缩放后它是正常的!
可能是什么问题呢 ?
这是有问题的图片
var chart;
// draw chart
$(function(){
$.getJSON('data.php?name=<?php echo $name; ?>&mysqltablename=<?php echo $mysqltablename; ?>&datatabletyp=<?php echo $datatabletyp ?>',
function(data) {
chart = new Highcharts.Chart
({
chart: { renderTo: '<?php echo $tabname; ?>', zoomType: 'x', type: 'line', width:800 },
credits: { enabled: false },
plotOptions: { series: { marker : { enabled: false, states: { hover: { enabled: true } } } } },
xAxis: { type: 'datetime' },
title: { text:' ' },
yAxis: { title: { text: '' } },
legend: { enabled: false },
series: [{ name: '<?php echo $tabname; ?>', data: data }],
tooltip: { valueDecimals: 2 } ,
});
Highcharts.setOptions({ global: { useUTC: false } });
Highcharts.numberFormat(this.y, 2, '.', ',');
});
});