Google Chart + Php + Mysql Geolocation

Indonesia geo chart
indonesia geo
geo

google.load(‘visualization’, ‘1’, {‘packages’: [‘geochart’]});
google.setOnLoadCallback(drawVisualization);

function drawVisualization() {var data = new google.visualization.DataTable();

data.addColumn(‘string’, ‘Country’);
data.addColumn(‘number’, ‘Value’);
data.addColumn({type:’string’, role:’tooltip’});var ivalue = new Array();

//data.addRows([[{v:’ID’,f:’ID’},1000,’Test’]]);

data.addRows(

[

[{v:’Sumatera Utara’,f:’ID’},21,’Sumut’],
[{v:’Sumatera Barat’,f:’ID’},50,’Sumbar’],
[{v:’Sumatera Selatan’,f:’ID’},50,’Sumsel’],
[{v:’Jawa Barat’,f:’ID’},23,’Jabar’],
[{v:’Kalimantan Timur’,f:’ID’},23,’Kaltim’],
[{v:’Bali’,f:’ID’},34,’Bali’],
[{v:’Sulawesi Selatan’,f:’ID’},39,’Sulsel’],
[{v:’Bengkulu’,f:’ID’},87,’Bengkulu’],
[{v:’Jawa Tengah’,f:’ID’},376,’Jateng’],
[{v:’Jawa Timur’,f:’ID’},34,’Jatim’] ,
[{v:’Sulawesi Barat’,f:’ID’},34, ‘sulbar’],
[{v:’Kalimantan Barat’,f:’ID’},21,’Kalbar’],
[{v:’Papua’,f:’ID’},21,’papua’],
[{v:’Maluku Utara’,f:’ID’},1,’maluku utara’],

]);

var options = {
backgroundColor: {fill:’#FFFFFF’,stroke:’#FFFFFF’ ,strokeWidth:0 },
colorAxis: {minValue: 0, maxValue: 0, colors: [ ‘#D64513’,]},
legend: ‘none’,
backgroundColor: {fill:’#FFFFFF’,stroke:’#FFFFFF’ ,strokeWidth:0 },
datalessRegionColor: ‘#f5f5f5’,
displayMode: ‘regions’,
enableRegionInteractivity: ‘true’,
resolution: ‘provinces’,
region:’ID’,
keepAspectRatio: true,
width:600,
height:600,
tooltip: {textStyle: {color: ‘#444444′}, trigger:’focus’}
};
var chart = new google.visualization.GeoChart(document.getElementById(‘visualization’));
chart.draw(data, options);
}

Pak Teguh Website

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s