Filter Picker
    • Dark
      Light

    Filter Picker

    • Dark
      Light

    Article summary

    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

    showCategoricalNull

    boolean

    true

    Show null as an option in categorical filter values

    url

    string

    The URL to fetch the list of fields.

    urlCategoricalValues

    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

    name

    string

    The name of the field being filtered, e.g., stats__Days Running__val

    op

    string

    The operation to apply, e.g., <=

    value

    number

    The value to compare against, e.g., 22

    title

    string

    The title of the filter, e.g., Days Running

    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"
    },


    What's Next