Explo
Search…
Switch
Switches allow your customers to be able to move between two configured states of your dashboard.

What it does

This component allows you to configure your dashboard so your customer can shift between two different states.

Configuration

Basic Configuration

Configuration Option
Description
Label
The is the label that appears on the left side of the switch. It defaults to "Switch". The toggle allows you to choose whether or not to display this label.
Descriptive Tooltip
This can be configured to display a helpful popover to end user. The toggle allows you to choose whether or not to display the tooltip.
On/Off Label
This is the label that appears on the right side of the switch, and it denotes the status of the switch. The toggle allows you to choose whether or not to display this label.
On/Off Value
This allows you to configure the value of the corresponding variable for this element. The default values are true for On and false for Off.

Variable Usage

In the SQL query, use the following syntax
1
--- basic usage:
2
WHERE 1=1
3
[[AND column_1 = {{switch1}}]]
4
5
--- filter a chart based on a column if switch is on, do nothing if switch is off
6
WHERE [[({{switch1}} = 'true' AND column_1 = true) OR ({{switch1}} = 'false')]]
Copied!