While plotting the Timeline chart I am facing the following error:

Invalid data at row #1: start(1511518003028) > end(1511518003025).

After searching over the web found that this occurs in case the start time 
is greater than the end time, but this is not in my case.

Attaching the error and the code which is causing the issue, along with one 
working example and the other which is having the said error.

<https://lh3.googleusercontent.com/-66ccJDLqmz8/WfwxH9CXCHI/AAAAAAAAEAM/8uoOypQnF48BFBduW2qxnpmewpkIcrzzACLcBGAs/s1600/Timeline_Error_Snap.png>
******************************************************************************************************************************************************************************************
<script type="text/javascript" src=
"https://www.gstatic.com/charts/loader.js";></script>


<script type="text/javascript">
google.charts.load("current", {packages:["timeline"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
    var container = document.getElementById('example3.1');
    var chart = new google.visualization.Timeline(container);
    var dataTable = new google.visualization.DataTable();
    dataTable.addColumn({ type: 'string', id: 'Fruit' });
    dataTable.addColumn({ type: 'string', id: 'Color' });
dataTable.addColumn({ type: 'number', id: 'EatStart' });
    dataTable.addColumn({ type: 'number', id: 'EatEnd' });
/* Not-Working -> Error in 2nd Data (Apple,Yellow) */ 
    dataTable.addRows([
 
  [ 'Apple','Green', new Date(2017,10,24,15,36,43,028).getTime(), new 
Date(2017,10,24,15,36,43,028).getTime()],
  [ 'Apple','Yellow', new Date(2017,10,24,15,36,43,028).getTime(), new 
Date(2017,10,24,15,36,43,031).getTime()],  // Error
  [ 'Apple','Red', new Date(2017,10,24,15,36,43,031).getTime(), new 
Date(2017,10,24,15,36,43,301).getTime()],
  [ 'Apple','LightGreen', new Date(2017,10,24,15,36,43,301).getTime(), new 
Date(2017,10,24,15,36,43,317).getTime()], 
  [ 'Apple','LightYellow', new Date(2017,10,24,15,36,43,317).getTime(), new 
Date(2017,10,24,15,36,43,389).getTime()],
  [ 'Apple','LightRed',new Date(2017,10,24,15,36,43,389).getTime(), new 
Date(2017,10,24,15,36,43,425).getTime()],
    ]);
/* Working */
    dataTable.addRows([
 
  [ 'Mango','Green', new Date(2017,10,24,15,36,51,673).getTime(), new 
Date(2017,10,24,15,36,51,673).getTime()],
  [ 'Mango','Yellow', new Date(2017,10,24,15,36,51,673).getTime(), new 
Date(2017,10,24,15,36,51,686).getTime()],
  [ 'Mango','Red', new Date(2017,10,24,15,36,51,686).getTime(), new 
Date(2017,10,24,15,36,51,975).getTime()],
  [ 'Mango','LightGreen', new Date(2017,10,24,15,36,51,975).getTime(), new 
Date(2017,10,24,15,36,52,082).getTime()], 
  [ 'Mango','LightYellow', new Date(2017,10,24,15,36,52,082).getTime(), new 
Date(2017,10,24,15,36,52,176).getTime()],
  [ 'Mango','LightRed',new Date(2017,10,24,15,36,52,176).getTime(), new 
Date(2017,10,24,15,36,52,377).getTime()],
    ]);
chart.draw(dataTable);

  }
</script>

<h1>SnacksTime</h1>
<div id="example3.1" style="height: 600px;"></div>  
 




Any help would be appreciated. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/8c830e6f-78c3-454b-84c9-9dfe31251bea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

<<attachment: test.php>>

Reply via email to