- Print
- DarkLight
Filter Picker
- Print
- DarkLight
The Filter Picker is a configurable component that allows users to create multiple filter conditions for both categorical and continuous fields.
Configuration Options
The picker can be configured through the following options:
Option | Type | Default | Description |
|---|---|---|---|
| boolean | true | Show null as an option in categorical filter values |
| string | The URL to fetch the list of fields. | |
| string | The URL to fetch categorical field values. |
Example Configuration
{
"id": "filter_1",
"showCategoricalNull": true,
"type": "filter",
"url": "<%= `/v1/selector/analytics/cycle/${getAssetType(asset)}/filter` %>",
"urlCategoricalValues": "<%= `/v1/selector/analytics/cycle/${getAssetType(asset)}/categorical/${getStatName()}?asset_selection=${getAssetSelection(asset)}&time_selection=${getTimeSelection(dateRange)}` %>"
}Default Query Params
The filter picker allows user to create multiple filters. Each filter generates the following params to the API Query:
Parameter | Type | Description |
|---|---|---|
| string | The name of the field being filtered, e.g., |
| string | The operation to apply, e.g., |
| number | The value to compare against, e.g., |
| string | The title of the filter, e.g., |
Example request body for a single filter condition.
"filter_1-r1RpwpJokx": {
"pickerType": "filter",
"value": [
{
"name": "stats__Days Running__val",
"op": "<=",
"value": 22,
"title": "Days Running"
},
{
"name": "stats__Days Running__val",
"op": ">=",
"value": 2,
"title": "Days Running"
}
],
"filterId": "filter_1"
},