Skip to content

Instantly share code, notes, and snippets.

@sharoonthomas
Created September 26, 2011 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharoonthomas/1242089 to your computer and use it in GitHub Desktop.
Save sharoonthomas/1242089 to your computer and use it in GitHub Desktop.
Google visualisation.js
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addRows(6);
data.addColumn('string', 'State');
data.addColumn('number', 'Customers');
data.setValue(0, 0, 'US-FL');
data.setValue(0, 1, 200);
data.setValue(1, 0, 'US-MN');
data.setValue(1, 1, 300);
data.setValue(2, 0, 'US-NJ');
data.setValue(2, 1, 400);
data.setValue(3, 0, 'US-AZ');
data.setValue(3, 1, 500);
var geochart = new google.visualization.GeoChart(
document.getElementById('visualization'));
geochart.draw(data, {width: 556, height: 347, resolution: 'provinces', region: 'US'});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment