How to plot data on time differences?

久未见 提交于 2020-01-16 08:09:31

问题


I have multiple data on each date for example i have 6 data values those need to plot single date. How would i plot them?

I am passing millisecond values in date in ForLoop under generateChartData() function:

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
});

I have setup date format also:

// Set date label formatting
dateAxis.dateFormats.setKey("day", "yyyy-MM-dd HH:mm");

But my values are not plotting as expected.

It should be view like below:

来源:https://stackoverflow.com/questions/54141255/how-to-plot-data-on-time-differences

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!