google charts - geochart

1

I'm having a little problem with geochart, the other graphics load normal, but the geo does not, it even shows the region of Brazil but does not populate the regions. Here is the code:

  google.charts.load("44", {packages:["corechart"]});

  google.charts.setOnLoadCallback(chartMapDoacoes);

  function chartMapDoacoes(){
    var data = google.visualization.arrayToDataTable([
        ['city', 'numedo de doacoes'],
        ['Barueri', '120442'],
        ['Carapicuiba', '231298'],
        ['Itapevi', '213876'],
        ['Jandira', '128396'],
        ['Sao paulo', '419226'],
        ['Campinas', '192381'],
        ['Jundiai', '391912'],
        ['Jarinu', '6398212'],
      ]);

    var options = {
    region: 'BR'
    }

    var chart = new google.visualization.GeoChart(document.getElementById('chart-geo'));
    chart.draw(data, options);
  }

and HTML:

    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script><body><divid="chart-geo"></div>
</body>
    
asked by anonymous 10.09.2016 / 17:56

1 answer

3

Try adding the code below to your options:

var options = {
        resolution: 'provinces', 
        region: 'BR',
        displayMode: 'markers'
}
    
24.10.2016 / 14:48