Hey Guys, 

I was hoping maybe one of you guys could help - i am trying to use the get 
selection so that when one clicks on a specific country they get sent too a 
new page. but as soon as i put the get selection method in my code  the 
chart no longer drew... (just a plain white screen)

Below is the java script - any help you could give would be GREATLY 
appreciated!!
========================================================================================
//geochates code
google.charts.load('upcoming', {'packages':['geochart']});
      google.charts.setOnLoadCallback(drawRegionsMap);

      function drawRegionsMap() { 
        
        var data = google.visualization.arrayToDataTable([
          ['Country', 'Languages', 'Frequency ', ' % of Total'],
          ['England','English' , 757, 16.3],
          ['Malaysia', 'Malay', 56, 1.2],
         ]);
        var options = {
              colorAxis: 
{colors:['#c6d8b8','#b8cfa7','#b1ca9e','#a1bf8b','#91b477','#82aa64','#729f51', 
'#63953E','#598637','#577740','#45682b','#3b5925','#314a1f'],
                          values: [5,6,8,9,10,17,21,43,46,56,757,839,2727]},
              backgroundColor: '#639bb7',
              datalessRegionColor: '#DFDFD0',
              defaultColor: '#f5f5f5',
            };
        
        var chart = new 
google.visualization.GeoChart(document.getElementById('regions_div'));
        chart.draw(data, options);
//start of get selection functionality 
        google.visualization.events.addListener(chart, 'select', function 
() {
        var selection = chart.getSelection();
        var value = data.getValue(selection[0].row, 0);

       if (value == 'England'|| value =='English') {
            window.location.href = "england.html";
        }
        }
    }

//=========================================================
 Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/03c3323c-42af-4c83-b0fe-aa85e14dae5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to