# Variable Single Select

# type: variableConfigSingleSelect

This Element allows to switch between differnent values of a Variable.

Variable-Config-Single-Select-Element

# Configuration Overview

{
  "id": "variableConfig",
  "type": "variableConfigSingleSelect",
  "config": {
    "variable": "agg",
    "options": [
      {
        "id": "vals0",
        "origin": "data",
        "labelColumn": "Company",
        "valueColumn": "Rank"
      },
      {
        "label": "Valueset1",
        "id": "vals1",
        "value": {
          "sub1": "val1",
          "sub2": "val2"
        }
      },
      {
        "label": "Valueset2",
        "id": "vals2",
        "value": {
          "sub1": "val5",
          "sub2": "val6"
        }
      }
    ],
    "label": "Select your Variable Value",
    "autocomplete": false,
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

# Properties

# id

Property: id

Type: string

Description: The unique ID assigned to the Element. This is defined by the Viewer and used to refer to the Element in Layouts.

"id": "variableConfig",
1

# type

Property: type

Type: string

Description: The Type of the Element.

"type": "variableConfigSingleSelect"
1

# autocomplete

Property: autocomplete

Type: boolean

Description: Enables an autocomplete as the select dropdown, to filter the available options. Disabled by default, but useful with a bigger number of options.

"autocomplete": true,
1

# config

Property: config

Type: object

Description: Configuration of the Element.

"config": {
    "variable": "agg",    // Name of the Variable.
    "options": [
      //... options
    ],
    "label": "Select your Variable Value"   // Label which is displayed above the Dropdown.
  }
1
2
3
4
5
6
7

# config.options - origin: raw

Property: config.options (origin = "raw") No origin property equals "origin": "raw".

Type: object

Description: Configuration of the options with raw values.

{
  "label": "Valueset1", // Label which is displayed in the Dropdown.
  "id": "vals1", // ID of the Variable set.
  "origin": "raw | data", // Origin of the data.
  "value": {
    "sub1": "val1", // Value for Variable "agg.sub1".
    "sub2": "val2" // Value for Variable "agg.sub2".
  }
}
1
2
3
4
5
6
7
8
9

# config.options - origin: data

Property: config.options (origin = "data")

Type: object

Description: Configuration of the options with values from a FRT.

"source": "frt_testSource",     // Datasource ID
"config": {
"options": [
  {
   "id": "vals0",
   "origin": "data",
   "labelColumn": "Company",    // Column of the displayed labels in the dropdown. If none is set, the values of the valueColumn will be displayed.
   "valueColumn": "Rank"        // Column of the values which should be used.
  },
]
}
1
2
3
4
5
6
7
8
9
10
11