Hi everybody, I'm totally new to charts and know very little of javascript. I'm trying to create a web page to show a timeline chart using google spreadsheet data. Can someone send me a template spreadsheet and the code to query this table and draw the timeline ? The code i tried to use was the one below. I have already made the spreadsheet public. Thanks for any advice.
Marcel <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", '1', {packages:['corechart']}); google.setOnLoadCallback(drawChart); function drawChart() { var query = new google.visualization.Query( 'https://docs.google.com/spreadsheets/d/1wD-TjSVctB4THaweMXvjxqaIsetQKfKDfaItd_lNboU/pubhtml'); query.send(handleQueryResponse); } function handleQueryResponse(response) { if (response.isError()) { alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } var data = response.getDataTable(); var chart = new google.visualization.Timeline(document.getElementById('chart')); chart.draw(data); } </script> <title>Data from a Spreadsheet</title> </head> <body> <span id='chart'></span> </body> </html> -- You received this message because you are subscribed to the Google Groups "Google Chart 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 http://groups.google.com/group/google-chart-api. For more options, visit https://groups.google.com/d/optout.
