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 :
But with the ISO 8601, same trouble. Any suggestion ?
I have problem with the google chart library. Actualy, i'm trying to display Datetime data to a timeline chart.
Here is my function :