I'm having difficulty in getting Google GeoChart to work as they describe in their documentation (and even samples)
https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Data_Format
In the sample on this page the Geo Chart shows the country colors to be using a scale based on popularity. Yet my own map shows all countries with same dark color regardless of the value of the popularity field. Additionally, the sample shows a legend while my own does not and the region sample also shows the tooltip label with country name as well as value while mine only shows the raw value for the data.
I've been pouring over the documentation to try and figure this out and am stuck. Any help appreciated.
Below is my code:
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {'packages':['geochart']});
google.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var data = google.visualization.arrayToDataTable([
['Country', 'Visits'],
['Austria','1'],
['Brazil','2'],
['Canada','40'],
['China','1'],
['Czech Republic','1'],
['Denmark','1'],
['Dominican Republic','1'],
['Ecuador','1'],
['France','1'],
['Netherlands','21'],
['United Kingdom','13'],
['United States','1140']
]);
var options = {
colorAxis: {colors: ['#f5f5f5','#267114']},
legend: 'Vists'
};
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>