Created
June 22, 2017 08:44
-
-
Save karansapolia/da3f161c25c28a51b7887311eb03cd9e to your computer and use it in GitHub Desktop.
India Map
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
<html> | |
<head> | |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
<script type="text/javascript"> | |
google.charts.load('current', { | |
'packages':['geochart'], | |
}); | |
google.charts.setOnLoadCallback(drawRegionsMap); | |
function drawRegionsMap() { | |
var data = google.visualization.arrayToDataTable([ | |
['State', 'Population'], | |
['Gujarat', 360000], ['Uttar Pradesh',999], ['Haryana', 34345], ['Andhra Pradesh', 240000], | |
['Uttarakhand', 234663], ['Himachal Pradesh', 442342], ['Delhi', 32342], | |
['Madhya Pradesh', 284321], ['Chhattisgarh', 15999], | |
['Orissa', 425656], ['Kerala', 35234], ['Punjab', 123434], | |
['West Bengal', 34344], ['Arunachal Pradesh', 6329], | |
['Tamil Nadu', 99999], ['Bihar', 512111], | |
['Tripura', 14], ['Jammu and Kashmir', 545434], ['Karnataka', 69999], ['Jharkhand', 34], | |
['Assam', 1], ['Rajasthan', 200], ['Maharashtra', 44444] | |
]); | |
var options = { | |
region: 'IN', // India | |
colorAxis: {colors: ['#ffefd5', 'yellow', '#e31b23']}, | |
backgroundColor: '#81d4fa', | |
datalessRegionColor: '#f8bbd0', | |
defaultColor: '#f5f5f5', | |
domain: 'IN', | |
resolution: 'provinces' | |
}; | |
var chart = new google.visualization.GeoChart(document.getElementById('geochart-colors')); | |
chart.draw(data, options); | |
}; | |
</script> | |
</head> | |
<body> | |
<div id="geochart-colors" style="width: 700px; height: 433px;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment