Parameter
A Parameter is a widget that can contain one or more variables. If you change a variable’s value in the Parameter widget in Browse mode, the indicators in other widgets that use this variable will also update. An example of usage is provided on the click action page Update variable.
Widget Settings
In addition to the common widget settings, this widget has unique options.
Data Settings
In the data settings tab, you need to add one or more dashboard variables. Click + Variable to view the list.
For each added variable, you can enable or disable the display of its name.
Display Settings
Beyond the common display settings, the following additional settings are available for variables in this widget:
- Variable name size
- Variable name color
- Variable name font weight
- Variable name position
- Orientation
Usage Example
A histogram with one dimension has been added to the view. We’ll use the Parameter widget to control the histogram’s visibility in Browse mode.
- Create a dashboard variable named Input value with a Boolean data type and set its initial value to
true. - Add a Parameter widget to the view and select the variable created in the previous step for display.
- In the histogram’s dimension display settings, choose “Custom” and use the previously created variable as the formula. It’s easiest to configure this in the (Formula editor ../4.Formula_editor.md).
- Publish the dashboard and verify that everything works as expected.
Widget Configuration in YAML
You can configure the widget not only in the visual editor but also in the YAML editor. The table below lists the keys and values available for configuration. For details on using the value key, refer to Dimension and measure values in YAML. Supported data formats are described on the corresponding page. General widget parameters are covered in Widget configuration in YAML.
Data Settings in YAML
| Key | Type | Description |
|---|---|---|
| title | string | Title |
| showMarkdown | boolean | Description |
| markdownText | string | Description text |
| markdownMeasures | — | Measure in description |
| variables | string | Variable |
Variables (block: variables)
| Key | Type | Description |
|---|---|---|
| variable | string | Variable |
| name | string | Variable name |
| showName | boolean | Toggle Display name |
Display Settings in YAML
| Key | Type | Description |
|---|---|---|
| paddings | string | Side paddings |
| titleSize | number | Title size |
| titleColor | — | Title color: - AUTO — auto- BASE — solid |
| titleWeight | enum | Font weight: - NORMAL — normal- BOLD — bold |
| markdownTextSize | number | Markdown description text size Specifies the size of the description text in Markdown. Available only if Description is enabled |
| variableNameSize | number | Variable name size |
| variableNameColor | — | Variable name color: - AUTO — auto- BASE — solid |
| variableNameWeight | enum | Variable name font weight: - NORMAL — normal- BOLD — bold |
| variableNamePosition | enum | Variable name position: - TOP — top- LEFT — left |
| orientation | enum | Variable orientation: - HORIZONTAL — horizontal- VERTICAL — vertical |
Example of a Configured Widget in the YAML Editor
widgets:
- key: parameter
apiVersion: "16"
type: PARAMETER
settings:
paddings: 8
titleSize: 14
titleColor:
mode: AUTO
titleWeight: NORMAL
title: ""
showMarkdown: false
markdownMeasures: []
markdownText: ""
markdownTextSize: 19
variables:
- name: Input value
variable: Input value
showName: true
- name: Variable limit type
variable: Variable limit type
showName: true
variableNameSize: 14
variableNameColor:
mode: AUTO
variableNameWeight: NORMAL
variableNamePosition: TOP
orientation: HORIZONTAL
Was the article helpful?