Junyangong (Talk | contribs) |
Junyangong (Talk | contribs) |
||
Line 4: | Line 4: | ||
<head> | <head> | ||
− | + | <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
− | + | <script type="text/javascript"> | |
− | + | google.charts.load('current', { | |
− | + | 'packages':['geochart'], | |
+ | // Note: you will need to get a mapsApiKey for your project. | ||
+ | // See: https://developers.google.com/chart/interactive/docs/basic_load_libs#load-settings | ||
+ | 'mapsApiKey': 'AIzaSyD-9tSrke72PouQMnMX-a7eZSW0jkFMBWY' | ||
+ | }); | ||
+ | google.charts.setOnLoadCallback(drawRegionsMap); | ||
− | + | function drawRegionsMap() { | |
var data = google.visualization.arrayToDataTable([ | var data = google.visualization.arrayToDataTable([ | ||
['Country', 'Population'], | ['Country', 'Population'], | ||
Line 24: | Line 29: | ||
]); | ]); | ||
− | + | var options = {}; | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | var chart = new google.visualization.GeoChart(document.getElementById('regions_div')); | |
− | + | chart.draw(data, options); | |
− | + | } | |
− | + | </script> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</head> | </head> | ||
Revision as of 19:33, 6 October 2017
Coming Soon...