Hi Daniel.

It doesn't work but almost.
It's better,  but something is weird.

Now json request is formated correctly.

{"cols":[{"label":"Room","type":"string"},{"label":"Name","type":"string"},{"label":"Start","type":"date"},{"label":"End","type":"date"}],"rows":[{"c":[{"v":"Room 200"},{"v":"Danard Franck *"},{"v":"Date(2017,0,28)"},{"v":"Date(2017,0,31)"}]},{"c":[{"v":"Room 201"},{"v":"Danard Franck *"},{"v":"Date(2017,0,29)"},{"v":"Date(2017,0,31)"}]}]}



        success: function (json) {
            console.debug(json);

            var container = document.getElementById('timeline');
            var chart = new google.visualization.Timeline(container);
            var dataTable = new google.visualization.DataTable(json);

            chart.draw(dataTable);
        }



This way returns an error. But!!!!
This way below works!!!!
If i make a copy and past the content of JSON request, it works.

        success: function (json) {
            console.debug(json);

            var container = document.getElementById('timeline');
            var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable({"cols":[{"label":"Room","type":"string"},{"label":"Name","type":"string"},{"label":"Start","type":"date"},{"label":"End","type":"date"}],"rows":[{"c":[{"v":"Room 200"},{"v":"Danard Franck *"},{"v":"Date(2017,0,28)"},{"v":"Date(2017,0,31)"}]},{"c":[{"v":"Room 201"},{"v":"Danard Franck *"},{"v":"Date(2017,0,29)"},{"v":"Date(2017,0,31)"}]}]});

            chart.draw(dataTable);
        }



I think there must be little to make it work.

There's something to do arround the variable json ?

Regards

*/Franck Danard/*
Le 28/01/2017 à 19:11, 'Daniel LaLiberte' via Google Visualization API a écrit :
And here is an example using your json data as you copied, but with "DATE"s changed to "Date"s: https://jsfiddle.net/dlaliberte/k97L511u/1/

--
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 [email protected].
To post to this group, send email to [email protected].
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/02496535-f970-1189-01ad-03564b99d499%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to