我尝试制作一些图表电池,但我在时间间隔上遇到了一些麻烦。我有一些像这样的代码
var ctx = document.getElementById('myChart').getContext('2d');
var chart = new Chart(ctx, {
// The type of chart we want to create
type: 'line',
// The data for our dataset
data: {
labels: ["2018-04-26 00:10:00", "2018-04-26 00:15:00", "2018-04-26 01:10:00", "2018-04-26 01:40:00", "2018-04-26 01:5:00", "2018-04-26 01:55:00", "2018-04-26 02:10:00"],
datasets: [{
label: "My First dataset",
data: [11.2, 11.6, 12.1, 12.1, 12.2, 12.4, 12.4],
}]
},
// Configuration options go here
options: {}
});
我不知道如何设置间隔30分钟。如果有人有想法?
感谢。