Hi all,
I developed a page that dynamically creates different timelines graphics, but when I run by obtaining the following error from the console:
Uncaught TypeError: Cannot read property 'Timeline' of undefined
the code of the page javascript that is invoked through a cycle is the following:
function reload_chart(id) {
var result = $.ajax("gantt_json.asp", {
async: false,
data: {fk_obbiettivo: id},
}).responseText;
//console.log(result);
return result;
}
function drawChart(oggetto,id) {
var container = document.getElementById(oggetto);
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable(reload_chart(id));
var options = {'title':'Fasi Operative'};
chart.draw(dataTable,options);
}
setTimeout(function(){google.charts.load('current',{'packages': ['timeline']})}, 2000
anyone has any idea about it.
Thank you in advance for the help you can give me.
Gianluca