Top.Mail.Ru
Parameter
CTRL+K

Parameter

In this article
  • Parameter
  • Widget Settings
  • Data Settings
  • Display Settings
  • Usage Example
  • Widget Configuration in YAML
  • Data Settings in YAML
  • Display Settings in YAML
  • Example of a Configured Widget in the YAML Editor

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 example

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.

Selecting a variable

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.

  1. Create a dashboard variable named Input value with a Boolean data type and set its initial value to true. Example, step 1
  2. Add a Parameter widget to the view and select the variable created in the previous step for display. Example, step 2
  3. 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). Example, step 3
  4. Publish the dashboard and verify that everything works as expected. Usage example, result

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

KeyTypeDescription
titlestringTitle
showMarkdownbooleanDescription
markdownTextstringDescription text
markdownMeasuresMeasure in description
variablesstringVariable

Variables (block: variables)

KeyTypeDescription
variablestringVariable
namestringVariable name
showNamebooleanToggle Display name

Display Settings in YAML

KeyTypeDescription
paddingsstringSide paddings
titleSizenumberTitle size
titleColorTitle color:
- AUTO — auto
- BASE — solid
titleWeightenumFont weight:
- NORMAL — normal
- BOLD — bold
markdownTextSizenumberMarkdown description text size
Specifies the size of the description text in Markdown. Available only if Description is enabled
variableNameSizenumberVariable name size
variableNameColorVariable name color:
- AUTO — auto
- BASE — solid
variableNameWeightenumVariable name font weight:
- NORMAL — normal
- BOLD — bold
variableNamePositionenumVariable name position:
- TOP — top
- LEFT — left
orientationenumVariable 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?

Yes
No
Previous
Filter
We use cookies to improve our website for you.