I am attempting to replicate a line graph similar to the one in the following fiddle link: http://jsfiddle.net/wRDXt/2/
In the example, the date is used as new Date(2013, 17, 1)
.
The JSON data I have is structured as shown below,
[{
"_id": "bb68d8a2-8778-4c85-8616-ed1e96a61ea6",
"FLAG": "public",
"STATUS": "active",
"DESCRIPTION": "df",
"DATE_TIME": "04-10-2016 16:39:39",
"TOKEN": "bge2jb",
"LAST_UPDATED": "Tue Oct 04 16:39:39 IST 2016"
},
{
"_id": "556ae8ad-7291-4303-a9e4-618a82694600",
"FLAG": "public",
"STATUS": "active",
"DESCRIPTION": "d",
"DATE_TIME": "04-10-2016 16:52:20",
"TOKEN": "16l4jal",
"LAST_UPDATED": "Tue Oct 04 16:52:20 IST 2016"
},
{
"_id": "98db36ba-392d-4df2-ac6c-820eaf582a11",
"FLAG": "public",
"STATUS": "active",
"DESCRIPTION": "uyk",
"DATE_TIME": "07-10-2016 12:13:10",
"TOKEN": "dfl5ja",
"LAST_UPDATED": "Fri Oct 07 12:13:10 IST 2016"
}]
The date format from the API call appears like 07-10-2016 12:13:10
or Fri Oct 07 12:13:10 IST 2016
.
When trying to pass this date, an error message is displayed in the console:
Uncaught TypeError: minDate.getDate is not a function
I need assistance on how to properly pass the date and generate the graph.
You can find my updated fiddle here: http://jsfiddle.net/wRDXt/190/