PBIVIZ Single Line Toggle Format Option Tip - CloudFronts

PBIVIZ Single Line Toggle Format Option Tip

We can add various Visual Formatting Options while developing a Power BI Custom Visual. One of them is the Toggle feature which is useful for adding or removing particular abilities to your visual or perform any similar boolean operations. The json bit for the toggle option looks like this.

Dropdown Toggle Option JSON

By default when you add a toggle option, the option is available under a dropdown. To access the toggle option you will always have to click on the dropdown arrow.

Dropdown Toggle Option

There is a neat little trick that can make you access the toggle button directly rather than clicking on the dropdown button every time. You only need to change the required toggle property name to “show”.
Note: The object name for the toggle option needs to be changed to “show” in the visual.ts file as well.

Single Line Toggle Option JSON

Your toggle option should look like this now!

Single Line Toggle Option

Share Story :

Secured By miniOrange