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.
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.
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.
Your toggle option should look like this now!