Skip to content

View Variables


View variables play a crucial role in dynamic visual data analysis. They allow users to update visualization results in real-time by changing the value of one or more view variables, enabling dynamic data filtering and analysis based on specific needs.

Start Adding

  1. Variable Name: The name of the current view variable set, which needs to be referenced in the chart query when adding charts to the dashboard. The format is: #{Variable Name};
  2. Display Name: The name of the current view variable set displayed in the dashboard. For example, the variable name is host, and the display name is Host Name;
  3. Query: Define the query logic for the view variable

    • Sorting: Sort the returned view variables by default, ascending, descending, or custom order.
  4. Display Options

    • Hide: When enabled, the variable is not visible in the dashboard in non-edit mode.

    • Include * Option: Enabled by default.

    • Multi-value: Allows selecting multiple values simultaneously.

  5. Default Value: The initial value of the current view variable in the dashboard. The dropdown will list variables based on the configuration in "Display Options," allowing you to select the initial value displayed by default in the dashboard. If the default value is empty, the dashboard will display the latest field data.

    • *: Ignore this field filter. The chart query will not include the filter condition for this variable;

    • All values: Use the result values of the view variable query statement as variable parameters;

    • Custom: Directly input the value in the selection bar and press Enter to create. You can search for your target variable in the selection bar.

Click Select to select all values in the current list.

Understanding All Values

Use the real-time results of the variable query statement as filter values. The chart query will automatically add a filter condition like field IN [value1, value2, ...], and the filter values will change dynamically with the query results. To avoid performance issues caused by excessive data, it is recommended that all values do not exceed 50.

Use Cases: Use when the chart needs to dynamically and accurately filter based on the variable query. For example, after selecting the project variable, the host variable will automatically obtain the host list for that project. Enabling all values will ensure the chart only displays data for these hosts (e.g., host IN [A, B, C]).

Note

When workspace data is interrupted, fields can be preset in the view variables; the system will automatically match them after data recovery.

Manage Variables

The following operations can be performed on view variables:

  • Variables can be cloned, edited again, or deleted directly;
  • If a variable is hidden during the configuration of view variables, a hide button will be displayed on the right side of the list.

Further Reading