Skip to content

Instantly share code, notes, and snippets.

@vmirly
Created February 20, 2016 22:01
Show Gist options
  • Select an option

  • Save vmirly/8a52496a4eecede668f9 to your computer and use it in GitHub Desktop.

Select an option

Save vmirly/8a52496a4eecede668f9 to your computer and use it in GitHub Desktop.
google.charts.load('current', {'packages':['geochart']});
google.charts.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var data = google.visualization.arrayToDataTable([
['State', 'Value'],
['CA', 780],
['MI', 300],
['NY', 400],
['CO', 500],
['TX', 600],
['IL', 700]
]);
var options = {region: 'US', resolution: "provinces"};
var chart = new google.visualization.GeoChart(document.getElementById('regions_div'));
chart.draw(data, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment