You're adding only 6 rows.
data.addRows(6) --> data.addRows(7)

On Sun, Feb 26, 2012 at 4:41 PM, Li Chen <[email protected]> wrote:

> I tried to include more countries than the 6 set in the sample code,
> however the may doesn't seem to support. Any idea?
>
> <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 data = new google.visualization.DataTable();
>      data.addRows(6);
>      data.addColumn('string', 'Country');
>      data.addColumn('number', 'Popularity');
>      data.setValue(0, 0, 'Germany');
>      data.setValue(0, 1, 200);
>      data.setValue(1, 0, 'United States');
>      data.setValue(1, 1, 300);
>      data.setValue(2, 0, 'Brazil');
>      data.setValue(2, 1, 400);
>      data.setValue(3, 0, 'Canada');
>      data.setValue(3, 1, 500);
>      data.setValue(4, 0, 'France');
>      data.setValue(4, 1, 600);
>      data.setValue(5, 0, 'RU');
>      data.setValue(5, 1, 700);
>      data.setValue(6, 0, 'CN');
>      data.setValue(6, 1, 700);
>
>      var options = {};
>      options['dataMode'] = 'regions';
>
>      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 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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