"Cannot read property 'datefield' of undefined” for a datetime

833 views
Skip to first unread message

Little squirrel

unread,
May 11, 2017, 7:30:49 AM5/11/17
to Google Visualization API
I have problem with the google chart library. Actualy, i'm trying to display Datetime data to a timeline chart.

Here is my drawchart() function : 

function drawChart() { var container = document.getElementById("occupancyChart"); var chart = new google.visualization.Timeline(container); var jsonData = { "cols": [ { "id": "Sensor_name", "type": "string" }, { "id": "Start", "type": "datetime" }, { "id": "End", "type": "datetime" } ], "rows": [ { "c": [ { "v": "Capteur" }, { "v": "1789-04-29T22:00:00.000Z" }, { "v": "1798-05-26T22:00:00.000Z" } ] } ] }; var dataTable = new google.visualization.DataTable( jsonData ); chart.draw(dataTable); }

In fact, jsonData doesn't exist, it's a ajax request, but it work, i got my data in the web page.

I tried to follow the API, so by using the datetime type in column, i tried to use format in documentation :

  • RFC 2822 — Dec 6, 2014 10:30:00 -0800.
  • ISO 8601 — 2014-12-06T10:30:00-0800.

But with the ISO 8601, same trouble. Any suggestion ?

Little squirrel

unread,
May 11, 2017, 7:33:49 AM5/11/17
to Google Visualization API

I have problem with the google chart library. Actualy, i'm trying to display Datetime data to a timeline chart.


Here is my function : 

Reply all
Reply to author
Forward
0 new messages