I have problem on the same thing.
 
here my code, what's wrong?
---------------------------------------------------------------------------------
 
google.load('visualization', '1.1', {'packages':['controls']}); 
google.setOnLoadCallback(drawDashboard);
 
function drawDashboard() { 
 
var dashboard = new google.visualization.Dashboard( 
          document.getElementById('dashboard')); 
   
var data = new google.visualization.DataTable(); 
 data.addColumn('number', 'ID'); 
....
 data.addColumn('number', 'Peso'); 
 data.addRows([...some rows...]);
 
var table = new google.visualization.ChartWrapper({
    'chartType': 'Table',
    'containerId': 'table',
    'options': {
      'width': 'automatic'
    },
     'view': {'columns': [1,...,10]}
});
 
google.visualization.events.addListener(table, 'ready', onReady);
 
var titoloPicker = new google.visualization.ControlWrapper({
    'controlType': 'CategoryFilter',
    'containerId': 'control4',
    'options': {
      'filterColumnLabel': 'Nome',
      'ui': {
        'labelStacking': 'vertical',
        'allowTyping': false,
        'allowMultiple': false    
      }
    }
  });
 
(... other ControlWrapper)

var chart = new google.visualization.ChartWrapper({
          'chartType': 'BarChart',
          'containerId': 'chart1',
          'options': {
            'width': 600,
            'height': 600,
            'chartArea': {top: 0, right: 0, bottom: 0}
     },
          'view': {'columns': [2,10]}
        });

  ...(other dashboard.bind)
  dashboard.bind(titoloPicker, [chart, table]);
  dashboard.draw(data); 
    
      function onReady() {
 google.visualization.events.addListener(table.getChart(), 'sort', 
 function(event) { 
        data.sort([{column: event.column, desc: !event.ascending}]);
 dashboard.draw(data); 
      });
     }
}

-- 
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/-/CuXKGpWx9P0J.
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