I have the following, very simple Geo Chart  (Code at the end of post)

<https://lh3.googleusercontent.com/-cSn_87pGkRs/VgFeAEQwLCI/AAAAAAAAAu4/KbVQFg_Wisw/s1600/result.JPG>

When I open the file in HTML works perfectly as in the picture above. 

However, if I copy and paste that code in https://script.google.com/  as I 
do in all my other Charts when I open the link generated 
by https://script.google.com/  the screens appear blank

THANK YOU SO MUCH!!!!!!!!!!

<html>
<head>
  <script type='text/javascript' 
src='https://www.google.com/jsapi'></script>
  <script type='text/javascript'>
   google.load('visualization', '1', {'packages': ['geomap']});
   google.setOnLoadCallback(drawMap);

    function drawMap() {

    var queryString = encodeURIComponent('SELECT A, B');
    var magicIncantation = '/gviz/tq?sheet=Map&headers=1&tq=';

    var query = new google.visualization.Query(
        
'https://docs.google.com/spreadsheets/d/1xfb9trifQA5KDPc9Nh5hBL4MJ290Mxcc1Uod2VTPzYI'
 
+
        magicIncantation + queryString);
    query.send(handleSampleDataQueryResponse);

    }


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


      var options = {
         region:'US',
         colors: [0x094FA4, 0x006EC1, 0x009EE5, 0x52BCEC, 0x89D1F3, 
0xB5E5F9],
         //enableRegionInteractivity: 'true',
         height : '500',
         width : '100%'
         //backgroundColor : 'white'
       };
      //options['dataMode'] = 'markers';


      var data = response.getDataTable();
      
      var container = document.getElementById('map_canvas');
      var geomap = new google.visualization.GeoMap(container);
      geomap.draw(data, options);
    };
  </script>
</head>

<body>
    <div id='map_canvas'></div>
</body>
</html>




-- 
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 http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/32233025-e606-456a-91e3-886b099f4235%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to