Reputation: 125
I need know how disable "Choose a value..." in controlType: CategoryFilter of ControlWrapper
var categoryPicker = new google.visualization.ControlWrapper({
'controlType': 'CategoryFilter',
'containerId': 'control2',
'options': {
'filterColumnLabel': 'zone',
'ui': {
'labelStacking': 'vertical',
'allowTyping': false,
'allowMultiple': false,
'caption' : 'All Zones'
}
},
'state': {'selectedValues': ['']} // this don't solve my problem
});
Is it possible to disable " choose a value" or here "All Zones"
Regard
Upvotes: 1
Views: 1247
Reputation: 26340
Set the ui.allowNone
option to false
to force the user to select a value. By default, the control will be set to the first value in the list, unless you override with the state.selectedValues
parameter:
var categoryPicker = new google.visualization.ControlWrapper({
'controlType': 'CategoryFilter',
'containerId': 'control2',
'options': {
'filterColumnLabel': 'zone',
'ui': {
'labelStacking': 'vertical',
'allowTyping': false,
'allowMultiple': false,
'allowNone': false
}
},
'state': {'selectedValues': ['Zone 2']}
});
Upvotes: 3