我希望将gvisGeoChart用于印度各省
G< -gvisGeoChart(ageProfile,“State”,“Males”,options = list(region =“IN”,displayMode =“regions”,resolution =“provinces”))
答案 0 :(得分:0)
您需要使用实际值填充数据数组,但要了解它的外观:
function drawVisualization() {
var data = google.visualization.arrayToDataTable([
['State', 'Population'],,
['West Bengal', 24],
['Gujarat', 25],
['Assam', 29],
['Punjab', 23],
['Delhi', 30],
...
]);
var options = {
region: 'IN',
displayMode: 'regions',
resolution: 'provinces',
width: 640,
height: 480
};
var geochart = new google.visualization.GeoChart(
document.getElementById('visualization'));
geochart.draw(data, options);
};