gvisGeoChart印度省级

时间:2015-10-19 14:40:12

标签: r google-maps gvisgeomap

我希望将gvisGeoChart用于印度各省 G< -gvisGeoChart(ageProfile,“State”,“Males”,options = list(region =“IN”,displayMode =“regions”,resolution =“provinces”))
enter image description here

但我正在寻找适合美国视觉效果的印度视觉效果。非常感谢您的帮助 enter image description here

1 个答案:

答案 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);
};