As I attempt to visualize a scatter plot using chart.js with (x,y) data where x represents a date string, I have noticed that most tutorials and examples available online utilize a function to generate a timestamp for demonstration purposes. However, I am yet to come across examples that demonstrate the use of actual collected data.
The dataset I possess is as follows (obtained from cron):
2017-07-08T06:15:02-0600,23.375
2017-07-08T06:20:02-0600,23.312
2017-07-08T06:25:02-0600,23.312
2017-07-08T06:30:02-0600,23.25
When attempting to input this data into chart.js (both with and without placing quotes around the data string), I used the following format:
data: [{
x: 2017-07-08T06:15:02-0600,
y: 23.375
},{
x: 2017-07-08T06:20:02-0600,
y: 23.312
},{
x: 2017-07-08T06:25:02-0600,
y: 23.312
},{
x: 2017-07-08T06:30:02-0600,
y: 23.25
}],
Unfortunately, nothing seems to render. Can anyone point out what mistake I might be making?