我正在尝试建立一个图表来跟踪我的项目状态。我已将输入作为时间戳记(2018年),但显示的是错误的年份(从1969年开始)。 代码如下
<script>
Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Project Status'
},
xAxis: {
categories: ['BOT POC', 'Analytics POC', 'CRM POC']
},
yAxis: {
type: 'datetime',
labels: {
rotation: -65,
style: {
fontSize: '9px',
fontFamily: 'Verdana, sans-serif'
}
},
crosshair: true,
dateTimeLabelFormats: {
week:"Week from %A, %b %e, %Y",
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y;
}
},
legend: {
reversed: true
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [{
name: 'Scoping In Progress',
data: [1528635194, 1528203194, 1527252794]
}, {
name: 'Scoping Complete',
data: [1528807994, 1528375994, 1527511994]
}, {
name: 'Development in Progress',
data: [1528894394, 1528462394, 1527943994]
}]
});
</script>
如何将日期带到当前日期/年份?