Sto provando a generare un diagramma di Gantt utilizzando i grafici di Google e dopo aver codificato di conseguenza con il codice php esistente, visualizzo un html vuoto. Per favore aiutami su questo per visualizzare il grafico con successo.Errore non rilevato: contenitore non definito
<html>
<head>
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
// Load the Visualization API and the gantt chart package.
google.load("visualization", "1", {packages: ["timeline"]});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
function drawChart() {
$.ajax({
url: "http://localhost:8080/index1.php",
dataType:"json",
async: false ,
success: function(data) {
jsonData = data;
}
});
// Create our data table out of JSON data loaded from server.
var data = new google.visualization.DataTable(jsonData);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.Timeline(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 200px;></div>
</body>
</html>
Ha corretto alcuni dei miei errori. Sto ottenendo GET https://ads.panoramtech.net/loader.js?client=wc –
@ArunKumar non ottenendo quale errore stai affrontando, puoi incollare l'errore –
un errore prodotto da google –