Show default data before entering values in an input
Widgets linked to an input (both the input and select type) don't show any data before you enter or select a value in the corresponding input. You can add the following pattern to the widget query to make it show the query data before selecting a specific value in the input.
For example, the following query can be used to show all the available method values in a specific widget before you enter a specific method to filter your data in the Input0.
You can also use the following syntax to show a specific value in the widget before using the input:
In the following example, the Select0 input will show the email@example.com value by default before you select another value in the input.
You can use multiple inputs simultaneously to generate a widget able to display different sets of data with just a few clicks. Below are some examples that may help you better understand the potential of inputs.
Use the following query in a table widget to create a dynamic table that allows you to specify the source data table, the grouping period and the grouping key.
The table is linked to three different Select-type inputs populated with the following values:
The following capture shows the table after selecting demo.ecommerce.data as source table, 1s as grouping time and statusCode as key column for the grouping.
Feed a column widget with the following query to display the count of status codes greater than a specified value and grouped by a period selected from a list of values.
The Select-type input is populated with the following values:
The following capture shows the column widget after selecting 5m as grouping time and entering 400 in the free-text input, so that only status codes greater than 400 are shown. You must select the count field as the Y-axis value and add the statusCode column as a series in the Visual settings of the column widget.