I would like to show a map of the US that colors states based on their rank 
in a datatable and displays the name of the state and some text in the 
tooltip. Here's my code. There's an error in here somewhere, but I'm not 
sure where. 


<script type="text/javascript" src="http://www.google.com/jsapi";></script><
script type="text/javascript">
    google.load('visualization', '1', {packages: ['geochart']});
    
    function drawVisualization() {
           data.addColumn('string',  'State', 'State');
           data.addColumn('number', 'rank', 'rank');
           data.addColumn('string', 'branch','branch');
           data.addRows([            
            ['Alabama', 1, 'Air Force: 4 KW'],
            ['Alaska', 2, 'Air Force: 30 KW'],
            ['Arizona', 3, 'Air Force: 1156 KW'],
        ]);

       
        
        var geochart = new google.visualization.GeoChart(document.
getElementById('visualization'));
        var options = {};
        options['region'] = 'US';
        options['resolution'] = 'provinces';
        options['width'] = 620;
        options['height'] = 368;
        options['colorAxis'] = {minValue: 0,  colors: ['#ddeef8', '#0078c0'
, '#80b452', '#ffe04e', '#f8931f', '#d54215']}

   
    
        geochart.draw(data, options);
    }
    

    google.setOnLoadCallback(drawVisualization);
  </script><div id="visualization">&nbsp;</div>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to