I concatenated two ready codes . one is candlestick chart and the other is 
query fro google spreasheet.each one of these two code works fine,but when 
debugging my procedure,an incomplete chart is drawn and  google.
setOnLoadCallback(drawVisualization) is shown at end of the chart.I am so 
thankful of someone who can give me a hand and rid me from this mess.here 
is the code:

<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>
      Google Visualization API Sample
    </title>
    <script type="text/javascript" src="https://www.google.com/jsapi";></
script>
    <script type="text/javascript">
      google.load('visualization', '1', {packages: ['corechart']});
    </script>
    <script type="text/javascript">
      function drawVisualization() {
       
  var query = new google.visualization.Query(
        
'https://docs.google.com/spreadsheet/pub?key=0AsEU1fdbnCNudGpvWk4tZU5iMVdpQ1ZTXzFkb2ZFWUE&single=true&gid=0&output=html'
);

    // Apply query language statement.
    query.setQuery('SELECT A,C,D,E,F');
    
    // Send the query with a callback function.
    query.send(handleQueryResponse);
  }

  function handleQueryResponse(response) {
    if (response.isError()) {
      alert('Error in query: ' + response.getMessage() + ' ' + response.
getDetailedMessage());
      return;
    }

    var data = response.getDataTable();

        var options = {
legend:          'none'
        };

        var chart = new google.visualization.CandlestickChart(document.
getElementById('chart_div'));
        chart.draw(data, options);
      }
 google.setOnLoadCallback(drawVisualization);
      
    </script>
  </head>
  <body>
    <div id="chart_div" style="width: 900px; height: 500px;"></div>
  </body>
</html>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/IzFS6UQ0dE4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to