Im using google motion charts to graph some data from a csv file. The file looks like so
411,(10/4/2014),24,21
371,(10/5/2014),247,239
959,(10/6/2014),266,23
680,(10/7/2014),211,24
But everytime I try to get it to graph the data I get the error "First and second columns must be entity and time.". What format does the date in the file need to be in?
I modified jlee-tessik idea and came up with the below code which successfully converts any dd/mm/yyyy to a date. Thanks
$.get(csvFile, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
for(i = 1; i < arrayData.length; ++i)
{
arrayData[i][1] = new Date (arrayData[i][1].replace(/\//g, ','));
}
var data = new google.visualization.arrayToDataTable(arrayData);