When I run the code below I get an error - Uncaught TypeError: Object #<X> 
has no method 'getSelection'

Any idea how I can interact with a table drawn within a dashboard.. Thanks..

/----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      var dashboard, table, data;
  
  function drawVisualization() {
        
var array = new Array(['ticker','time','bid','open','high','low','volume']);
var ticker, time, bid, open, high, low, volume; 
$.get('php/getdata.php', {input: 'stocklist'}, function(data1){
 $.each(data1, function(index, value){ 
ticker = value.ticker;
time = value.time;
bid = parseFloat(value.bid);
open = parseFloat(value.open);
high = parseFloat(value.high);
low = parseFloat(value.low);
volume = parseFloat(value.volume);
array.push([ticker, time, bid, open, high, low, volume]);
});
        data = google.visualization.arrayToDataTable(array);

        var stringFilter = new google.visualization.ControlWrapper({
          'controlType': 'StringFilter',
          'containerId': 'control1',
          'options': {
            'filterColumnLabel': 'ticker'
          }
        });

        table = new google.visualization.ChartWrapper({
          'chartType': 'Table',
          'containerId': 'chart1',
          'options': {'showRowNumber': false, 'height': '130px', 'width': 
'1000px'}
        });

        dashboard = new 
google.visualization.Dashboard(document.getElementById('dashboard'))
dashboard.bind(stringFilter, table);
dashboard.draw(data);
  
google.visualization.events.addListener(table, 'select', selectHandler);
      }, "json");
  }
  
  function selectHandler() {
var selection = table.getSelection();
      alert();
    }
      
      google.setOnLoadCallback(drawVisualization);
  
  
  

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/1RIjEKYPhlkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to