Example
globalFilters.getFilters()
Methods
(async) addFilter(itemContext, filterContextopt, setOptions) → {Object}
Adds a new filter to the widget.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
itemContext |
Object | Object Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
filterContext |
Object |
<optional> |
Filter context object Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
setOptions |
Object | Options for visTransaction |
Returns:
an object that includes the id of the added filter
- Type
- Object
Example
filters.addFilter({
itemId: 'sales_and_marketing_csv.Product_line'
}, {
values: [{
u: 'sales_and_marketing_csv.Year_->[2006]',
d: '2006'
}]
});
filters.addFilter({
itemId: 'sales_and_marketing_csv.Quantity'
}, {
from: {
u: 0,
d: 0
},
to: {
u: 500000,
d: 500000
}
});
(async) editFilter(itemContext, filterContextopt, setOptions)
Edits an existing filter.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
itemContext |
Object | Object Properties
|
|||||||||||||||||||||
filterContext |
Object |
<optional> |
Filter context object Properties
|
||||||||||||||||||||
setOptions |
Object | Options for visTransaction |
Example
filters.editFilter({
itemId: 'sales_and_marketing_csv.Product_line'
}, {
values: [{
u: 'sales_and_marketing_csv.Year_->[2006]',
d: '2006'
}]
});
getFilterList() → {Array.<Object>}
Gets the list of filter specifications.
Returns:
Array of filter specifications
- Type
- Array.<Object>
(async) removeFilter(itemContext, setOptions)
Removes an existing filter
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
itemContext |
Object | Object Properties
|
|||||||||||||
item.aggregationType |
string |
<optional> |
Data item aggregation type |
||||||||||||
setOptions |
Object | Options for visTransaction |
Example
filters.removeFilter({
itemId: 'sales_and_marketing_csv.Product_line'
});