Created
September 26, 2011 12:04
-
-
Save sharoonthomas/1242089 to your computer and use it in GitHub Desktop.
Google visualisation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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