我每个日期都有多个数据,例如我有6个需要绘制单个日期的数据值。我将如何绘制它们?
我正在 generateChartData()函数 下通过ForLoop传递日期中的毫秒值:
let newDate = new Date(parseInt(this.vitalHistoryEachData[i]['observation-time'])); //1504549740000,1504535400000,1504532700000,1504530900000
newDate.setDate(newDate.getDate());
// output Mon Sep 04 2017 23:59:00 GMT+0530 (India Standard Time), Mon Sep 04 2017 20:00:00 GMT+0530 (India Standard Time), Mon Sep 04 2017 19:15:00 GMT+0530 (India Standard Time), Mon Sep 04 2017 18:45:00 GMT+0530 (India Standard Time)
chartData.push({
date: newDate,
DataSet1: DataSet1,
DataSet2: DataSet2
});
我也有设置日期格式:
// Set date label formatting
dateAxis.dateFormats.setKey("day", "yyyy-MM-dd HH:mm");
应为如下视图: