Hey guys, 

Do you know if it's required that we use a DataTable when using the 
categoryFilter? In addition, is there any way to have it without having a 
dashboard too?
I'm trying to make a wrapper class so I can use the look and functionality 
of the control with my own implementation on it's statechanged method.

Here's what I'm trying to do:

 var data = google.visualization.arrayToDataTable([
    ['Metric', 'Value'],
    ['CPU' , 12],
    ['Memory', 20],
    ['Disk', 7],
    ['Network', 54]
  ]);
  var config = {};
  
  var control = new google.visualization.ControlWrapper({
    'controlType': 'CategoryFilter',
    'options': {
      'filterColumnIndex': 0,
      'ui': {
        'allowTyping': false,
        'allowMultiple': config.multipleSelections, // default is true
        'selectedValuesLayout': config.selectionLayout, // default is aside
        'caption': config.caption // default is: 'Choose a value...'
      }
    },
    // Define an initial state, i.e. a set of metrics to be initially 
selected.
    'state': {'selectedValues': config.initialSelection}
  });
  
  control.setContainerId('control1');
  control.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/-/VnkoBiSSukIJ.
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