Javascript examples for Google Chart:Geo Chart
Highlight Africa using the Google Visualization Geochart
<html> <head> <title>Geo Chart Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['geochart']}]}"></script> <div id="regions_div" style="width: 900px; height: 500px;"></div> <script type="text/javascript"> google.setOnLoadCallback(drawRegionsMap); function drawRegionsMap() { var data = google.visualization.arrayToDataTable([ ['Region Code', 'Continent', 'Popularity'], ['142', 'Asia', 200], ['150', 'Europe', 300], ['019', 'Americas', 400], ['009', 'Oceania', 600], ['002', 'Africa', 700] ]);/* www . j a v a 2 s . co m*/ var options = { resolution: 'continents' }; var chart = new google.visualization.GeoChart(document.getElementById('regions_div')); chart.draw(data, options); } </script> </body> </html>