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);