GeoCharts: define text that appears when hovering country

24 views
Skip to first unread message

UnknownInnocent

unread,
Nov 7, 2019, 10:52:55 AM11/7/19
to Google Visualization API
Hello I just started using GeoCharts and I have a question that wasn't answered for me with the information given.

I have following code:

 var data = google.visualization.arrayToDataTable([
          ['Country'''],
          ['India'2],
          ['Australia'10],
          ['Germany'1],
          ['United States'2],
          ['Brazil'2],
          ['Canada'3],
          ['France'2],
          ['RU'2]
        ]);

    var options = {
      backgroundColor: '#17263c',
      datalessRegionColor: '#242f3e',
      legend: 'none',
      colors: ['#00853f''black''#e31b23']
    };


If I now hover a country, I get a box with two rows:

1. row: the county's name

2. row: the number


now I would like to define a custom text to show in the second line and use the numbers just to tell what color the country should have.


example for output I'd like to have:

1. row: the county's name

2. row: homecountry

Reply all
Reply to author
Forward
0 new messages