issue with select event

37 views
Skip to first unread message

sindhu

unread,
May 24, 2012, 6:12:53 AM5/24/12
to google-visua...@googlegroups.com
hi 
plz help me,i'm just stuck over

1.after the alert message i have to display that particular states information in tabular formatted
2.when hover on  any of the state that should display that states information in pie and column chart

function drawVisualization() {
      var query = new google.visualization.Query(

      query.setQuery('SELECT C');

            query.send(handleQueryResponse);
    }
     function handleQueryResponse(response) {
     if (response.isError()) {
       alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
       return;
      }
    var data = response.getDataTable();
      var map = new google.visualization.GeoChart(document.getElementById('visualization'));


google.visualization.events.addListener(map, 'select', function() {
  var selection= map.getSelection();
  var value = data.getValue(selection[0].row, 0);
          alert(value);
           if(value==""){
           


         
          map.draw(newData, newOptions);
      });

      map.draw(data,{width: 700, height: 400, region: 'IN', resolution: 'provinces' });
}
  google.setOnLoadCallback(drawVisualization);

asgallant

unread,
May 24, 2012, 9:21:17 AM5/24/12
to google-visua...@googlegroups.com
For #1, see this post: https://groups.google.com/forum/#!topic/google-visualization-api/KfmfZYUonXw 

I don't think there is an easy way to accomplish #2, but I'll look into it to see if I can come up with anything.
Reply all
Reply to author
Forward
0 new messages