Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
473 views
in Technique[技术] by (71.8m points)

google visualization - Can Region GeoChart be displayed for different states of different countries and can custom text be displayed on the Region GeoChart?

We are using Google Region GeoChart to implement chart similar to Excel Map Chart.

  1. Requirement is to display states of more than one country on the Region GeoChart. Tried to use region property set to world but this does not work.

     function drawRegionsMap() {
             var objChart = [
                       ['State', 'Popularity'],
                       ['Maharashtra', 200],
                       ['Goa', 300],
                       ['Kerala', 400],
                       ['Alabama', 500],
                       ['Colorado', 600],
                       ['Idaho', 700]
             ];
     var data = google.visualization.arrayToDataTable(objChart);
             var options = {
                 region: 'world',
                 displayMode: 'regions',
                 resolution: 'provinces',
                 colorAxis: { colors: ['#e7711c', '#4374e0'] }
             };
             var chart = new google.visualization.GeoChart(document.getElementById('dvMapChartContainer'));
             chart.draw(data, options);
         }
    
  2. Is it possible to display text like shown below on the Region GeoChart? If yes, then is there a way that be done?

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...